00:02:05 | * | ftsf joined #nim |
00:03:46 | FromGitter | <bung87> cant easy provider example , I modfied the std libs... |
00:03:56 | leorize[m] | shashlick: yes you can |
00:04:19 | leorize[m] | --benchmarkVM or something like that will enable time functions |
00:04:31 | zacharyc1rter | sweet - I think my fiber based job system is working now |
00:04:32 | leorize[m] | check out --fullhelp |
00:04:40 | zacharyc1rter | at least context switching inside of a thread is |
00:04:51 | zacharyc1rter | at least context switching inside of a thread is |
00:04:54 | zacharyc1rter | oops sorry |
00:05:09 | FromDiscord | <Elegant Beef> You committed the cardinal sin, good bye |
00:05:14 | zacharyc1rter | :D |
00:08:11 | FromDiscord | <codic> sad |
00:08:25 | zacharyc1rter | what's sad? |
00:08:42 | FromDiscord | <codic> That you commited the cardinal sin |
00:08:48 | zacharyc1rter | ah - I do it all the time |
00:08:54 | FromDiscord | <codic> lol |
00:09:06 | FromDiscord | <Elegant Beef> How do you even accidently resend a message on irc? |
00:09:18 | zacharyc1rter | press the up arrow and then enter in irssi |
00:09:26 | FromDiscord | <codic> Alright, how do I add a button with nim's `ui`? |
00:09:26 | Yardanico | same for quassel |
00:09:27 | Yardanico | same for quassel |
00:09:31 | FromDiscord | <codic> That executes a proc when done |
00:09:36 | FromDiscord | <Elegant Beef> Ah so same way as discord but not editing π |
00:09:44 | zacharyc1rter | Nim doesn't have a UI? |
00:09:51 | FromDiscord | <codic> Uh |
00:09:52 | FromDiscord | <Elegant Beef> Yea i was super confused |
00:09:54 | Yardanico | he's referring to nim-lang/ui lib |
00:09:54 | FromDiscord | <Elegant Beef> Nigui? |
00:09:55 | FromDiscord | <codic> https://github.com/nim-lang/ui |
00:10:01 | Yardanico | don't use that :P |
00:10:04 | FromDiscord | <codic> The libui wrapper |
00:10:05 | FromDiscord | <codic> Why? |
00:10:07 | zacharyc1rter | dafuq is this? |
00:10:11 | Yardanico | zacharyc1rter: libui wrapper |
00:10:20 | Yardanico | use NiGui |
00:10:21 | FromDiscord | <codic> why shouldn't I use it? |
00:10:22 | FromDiscord | <codic> Oh |
00:10:28 | Yardanico | or gintro if you want full-fledged GTK gui |
00:10:34 | Yardanico | gintro bindings to GTK are superb |
00:10:44 | FromDiscord | <codic> yeah, I just need a dialog box with two buttons |
00:10:48 | FromDiscord | <Elegant Beef> *or if you're daft like me use imgui* π |
00:10:51 | Yardanico | well NiGui will work for you then |
00:11:00 | FromDiscord | <codic> looking at examples |
00:12:06 | FromDiscord | <codic> UCI is pretty cool btw |
00:12:17 | FromDiscord | <Elegant Beef> Xlib atoms are the most "how the hell do these work" i've ever seen |
00:13:06 | FromDiscord | <codic> Wow nigui is actually great |
00:13:12 | FromDiscord | <Elegant Beef> It is |
00:20:30 | * | oculuxe joined #nim |
00:21:12 | * | oculux quit (Ping timeout: 258 seconds) |
00:21:39 | FromDiscord | <codic> Anyone see a glaring problem with this? https://hatebin.com/ydlhahwmmw |
00:22:01 | Yardanico | yes |
00:22:17 | Yardanico | you define "status" inside of if/else scopes so it's not accessible at global level |
00:23:01 | FromDiscord | <codic> oh, would I use let instead? |
00:23:04 | FromDiscord | <Elegant Beef> no |
00:23:13 | Yardanico | lemme show you |
00:23:15 | FromDiscord | <codic> just have the textbox in if? |
00:23:17 | FromDiscord | <Elegant Beef> those are both declarations which depend on variable scope |
00:23:27 | FromDiscord | <Elegant Beef> variables are only accessible in their indent and below |
00:23:41 | FromDiscord | <Elegant Beef> *Unless globally declared* |
00:23:53 | FromDiscord | <codic> how do i declare em glbally? |
00:24:04 | FromDiscord | <codic> hm wait |
00:24:12 | FromDiscord | <Elegant Beef> before any logic just do `var status = status` |
00:24:19 | FromDiscord | <Elegant Beef> second status is a string |
00:24:21 | FromDiscord | <Elegant Beef> Im just dumb |
00:24:29 | FromDiscord | <Elegant Beef> I'd also say use enums over strings for things like this |
00:24:38 | FromDiscord | <codic> Ok |
00:24:38 | FromDiscord | <codic> Why enums? |
00:25:05 | FromDiscord | <Elegant Beef> Cause they're nicely named integers, and cannot be mispelled |
00:25:34 | FromDiscord | <Elegant Beef> strings can easily be mispelled and i'd say should only ever be used in UI, and rarely used in logic |
00:25:41 | Yardanico | https://play.nim-lang.org/#ix=2jYg |
00:25:47 | FromDiscord | <codic> yeah but then |
00:25:50 | Yardanico | at least it compiles now |
00:26:15 | FromDiscord | <codic> I have to rewrap my whole textbox in an if else |
00:26:23 | FromDiscord | <codic> which adds complexity |
00:26:26 | Yardanico | ? |
00:26:26 | FromDiscord | <codic> Oh thanks yardanico |
00:26:33 | FromDiscord | <codic> What do you mean? |
00:26:33 | Yardanico | check the code I linked |
00:26:36 | FromDiscord | <codic> I did |
00:26:42 | FromDiscord | <codic> I was talking about using enums |
00:26:46 | Yardanico | oh |
00:26:46 | FromDiscord | <codic> instead of strings |
00:26:53 | Yardanico | well you don't really need to |
00:26:59 | Yardanico | enums can have strings as values |
00:27:46 | FromDiscord | <codic> oh |
00:27:48 | FromDiscord | <Elegant Beef> Enums are superior to string based logic, even without the abillity to store a ordinal + string value |
00:52:22 | * | sacredfrog quit (Quit: ZNC 1.7.5 - https://znc.in) |
00:54:04 | * | sacredfrog joined #nim |
00:54:40 | * | exelotl_ quit (Ping timeout: 246 seconds) |
00:55:36 | * | krux02_ is now known as krux02 |
00:59:35 | zacharyc1rter | still seems there's an issue with threads and `--gc:arc` |
00:59:39 | * | Kaivo quit (Quit: WeeChat 2.8) |
00:59:43 | zacharyc1rter | program randomly crashes and if I run with asan it crashes every time |
01:00:02 | zacharyc1rter | when I run with `--exceptions:setjmp and --tlsEmulation:off` |
01:00:03 | disruptek | bugs are expected. |
01:00:20 | zacharyc1rter | yeah I know, I just have no idea what is causing them nor how to fix |
01:00:56 | disruptek | what happens with setjmp and tlsEm:off? |
01:01:42 | disruptek | you don't have any smaller repro, right? |
01:02:37 | zacharyc1rter | I'm trying to come up with one |
01:02:49 | zacharyc1rter | https://gist.github.com/zacharycarter/06d5a3effa0a23b12e9318eff9d5dc1f - is the backtrace |
01:04:02 | zacharyc1rter | it's definitely a `--gc:arc` issue though because it runs fine with the default gc |
01:04:17 | FromGitter | <bung87> found when the compress data string convert to cstring , it is truncated. |
01:04:29 | Yardanico | how are you "converting" it? |
01:04:49 | FromGitter | <bung87> just string.cstring |
01:05:16 | disruptek | we saw something like this before. i wonder if it's finding a null and assuming the string is finished. |
01:06:11 | FromGitter | <bung87> hmm not like python theres read binary mode |
01:06:55 | FromGitter | <bung87> I need read using `staticRead` which is string, then `.cstring`, the problem occurs... |
01:07:13 | disruptek | you need to create a cstring with a certain length. then it should copy. i assume... |
01:07:45 | Yardanico | oh staticRead |
01:07:47 | disruptek | actually, i can't think why you'd need to specify the length. |
01:07:58 | Yardanico | there might be an issue with staticRead |
01:07:59 | krux02 | I just figured out, that I am not a member of nim-lang anymore. |
01:08:17 | leorize[m] | how so? |
01:08:21 | krux02 | don't know |
01:08:32 | krux02 | I wanted to tag an issue, can't do it anymore. |
01:08:58 | Yardanico | might be https://github.com/nim-lang/Nim/issues/13786 |
01:09:00 | Yardanico | for staticRead |
01:09:00 | disbot | β₯ staticExec removes trailing LF which interferes with binary output that happens to end with 0xA ; snippet at 12https://play.nim-lang.org/#ix=2jYr |
01:09:04 | Yardanico | @bung87 try reading at runtime |
01:09:06 | Yardanico | with readFile |
01:09:11 | Yardanico | and see if it works or not |
01:09:13 | leorize[m] | Araq might still be awake and can give it back |
01:09:14 | disruptek | yeah, that's the bug i was thinking of. |
01:09:27 | disruptek | it's like 2a his time. |
01:09:47 | FromGitter | <bung87> I 'm search my prevous code about string ,cstring things |
01:10:01 | disruptek | just work the problem. |
01:10:15 | disruptek | it's just bytes. |
01:14:13 | FromGitter | <bung87> `readFile ` not work |
01:15:18 | leorize | can I see the code? |
01:16:23 | FromGitter | <zetashift> Did something change with NimScript? https://play.nim-lang.org/#ix=2jYs |
01:16:26 | krux02 | leorize, I don't think he is still awake, it is pretty late |
01:16:51 | FromGitter | <bung87> https://github.com/bung87/finder/blob/master/src/finder.nim |
01:17:32 | leorize | use `let`, not `const` :P |
01:17:38 | * | Hideki_ joined #nim |
01:17:41 | zacharyc1rter | well - all the threading issues seem to stem from the new exceptions |
01:18:01 | zacharyc1rter | and just using setjmp doesn't help - if I use the commit hash before the new exceptions got introduced things work |
01:18:10 | FromDiscord | <flywind> https://github.com/nim-lang/Nim/pull/12860 |
01:18:11 | disbot | β₯ Undefine `paramCount` & `paramStr` in nimscript.nim for *.nims |
01:18:13 | Yardanico | ok now I feel like my mathexpr lib is useless after https://github.com/zevv/npeg/blob/master/tests/precedence.nim :D |
01:18:52 | Yardanico | it's a simple math evaluator in ~30 loc lol wtf |
01:18:53 | FromGitter | <zetashift> oof thanks flywind I didn't see those in changelog for 1.2 |
01:19:05 | FromGitter | <bung87> I confirmed, |
01:19:13 | Yardanico | works at runtime? |
01:19:24 | FromGitter | <bung87> len not equals... |
01:19:27 | leorize | Yardanico: now if that thing is faster than your mathexpr lib it will be even funnier :P |
01:19:35 | leorize | what len not equal? |
01:19:51 | FromGitter | <bung87> string len 657,cstring len 19 |
01:19:52 | Yardanico | it probably is but lemme check with simple 2+2*2 |
01:19:59 | leorize | bung87: use the string len |
01:20:02 | leorize | don't use cstring len |
01:20:14 | Yardanico | although mathexpr does more stuff like checking for functions and stuff |
01:20:38 | zacharyc1rter | actually, nevermind, even with the version of Nim before the exceptions change, if I run things through lldb I get a null pointer use exception |
01:20:57 | FromGitter | <bung87> ok , let me add a len param |
01:21:17 | leorize | bung87: you can just take a string then go from there |
01:21:24 | disruptek | it's just bytes. |
01:21:57 | leorize | use Nim types whenever you can |
01:22:05 | Yardanico | ah wait actually wtf |
01:22:12 | Yardanico | why my mathexpr is sooo much faster than this peg |
01:22:15 | FromGitter | <zetashift> So next version where nimscript `paramCount` was used you need to import OS if I understand this correctly? |
01:22:26 | FromGitter | <zetashift> import * |
01:22:27 | leorize | yea, some stuff are unexported |
01:22:30 | FromGitter | <zetashift> os* jeez it's so late |
01:22:53 | FromGitter | <zetashift> @leorize was that towards me, just to be sure he? :p |
01:22:59 | leorize | yep |
01:23:04 | Yardanico | I get 500k iters/s for npeg one and 10mil for mathexpr |
01:23:05 | Yardanico | for 2+2*2 |
01:23:08 | FromGitter | <zetashift> okay thanks! Could be worse change |
01:23:21 | leorize | Yardanico: maybe it's due to the differences in algorithm |
01:23:45 | leorize | also make sure to put the whole thing in a proc |
01:24:02 | Yardanico | I use nimbench (yes its very old but I still haven't found a good simple alternative) |
01:24:16 | disruptek | hyperfine or golden |
01:24:20 | FromGitter | <bung87> ok pass string directly works ,no error now |
01:24:35 | disruptek | or criterion |
01:24:40 | disruptek | !repo criterion |
01:24:41 | disbot | https://github.com/LemonBoy/criterion.nim -- 9criterion.nim: 11Statistic-driven micro-benchmark framework 15 38β 4π΄ |
01:24:44 | Yardanico | it's archived |
01:24:48 | disruptek | use my branch |
01:25:04 | Yardanico | it has no new commits? |
01:25:12 | disruptek | no, but we're collecting any issues. |
01:25:34 | disruptek | iirc, it works but exposes a pragma bug. |
01:25:38 | disruptek | but nothing too serious. |
01:25:56 | disruptek | !repo golden |
01:25:56 | disbot | https://github.com/disruptek/golden -- 9golden: 11a benchmark for compile-time and/or runtime Nim π 15 17β 0π΄ |
01:26:15 | Yardanico | and so how would I benchmark some operation repeated a lot of times for two libs? |
01:26:27 | Yardanico | doesn't golden call the binary each time? |
01:26:36 | disruptek | sure. |
01:26:46 | disruptek | write two tests or use criterion. |
01:26:52 | Yardanico | also it failed to install on devel :D |
01:27:01 | disruptek | criterion? |
01:27:04 | Yardanico | golden |
01:27:20 | disruptek | ah, i rarely test it because i think it's broken on arc. |
01:27:25 | Yardanico | Error: undeclared identifier: 'paramCount' |
01:27:28 | Yardanico | in https://github.com/xmonader/nim-terminaltables/blob/master/terminaltables.nimble |
01:27:33 | disruptek | omg |
01:27:45 | disruptek | that guy uses crystal now, anyway. |
01:27:50 | Yardanico | https://github.com/nim-lang/Nim/pull/12860 ? |
01:27:56 | disruptek | i saw him in there when i was trolling. |
01:27:56 | disbot | β₯ Undefine `paramCount` & `paramStr` in nimscript.nim for *.nims |
01:28:07 | Yardanico | but where's backwards compat |
01:28:51 | Yardanico | aren't we 1.0 release and stuff |
01:28:56 | Yardanico | so no breaking changes like that are allowed |
01:29:05 | FromGitter | <zetashift> it's in devel not stable |
01:29:14 | FromGitter | <zetashift> only change needed is import os |
01:29:21 | Yardanico | well but it'll be eventually in a new release |
01:29:31 | Yardanico | and new releases still need to keep compat with 1.0 code |
01:29:33 | FromGitter | <zetashift> true, I dunno how they're gonna deal with it |
01:29:47 | FromGitter | <zetashift> usually there was a deprecation path |
01:29:59 | FromGitter | <zetashift> I also just ran into that error |
01:30:05 | Yardanico | oh nvm |
01:30:05 | Yardanico | https://github.com/nim-lang/nimble/pull/797 |
01:30:06 | disbot | β₯ Fix nimble because `paramCount` & `paramStr` for nimscript are now defined in os.nim |
01:30:17 | FromGitter | <zetashift> it's a nimble problem yea |
01:30:28 | FromGitter | <zetashift> cause godot-nim imports os everywhere |
01:30:40 | disruptek | it'll be a problem everywhere. |
01:31:05 | FromGitter | <zetashift> also for anyone who has 3 minutes to spare and hasn't installed godot-nim yet can one try to install it and set the GODOT_BIN environment and see if Nim picks it up? https://github.com/pragmagic/godot-nim/issues/58 |
01:31:13 | disbot | β₯ Can't build sample app on Mac, environment variable not working ; snippet at 12https://play.nim-lang.org/#ix=2jYt |
01:31:22 | FromGitter | <zetashift> I ran into it, restarted it and it works now but can't reproduce |
01:39:41 | FromDiscord | <codic> My gui so far. functionally it works. but what i'd like: |
01:39:41 | FromDiscord | <codic> - put close and enable next to each other |
01:39:41 | FromDiscord | <codic> - Make the "Tor is currently not running" non-editable. |
01:39:41 | FromDiscord | <codic> |
01:39:42 | FromDiscord | <codic> i'm using nigui https://play.nim-lang.org/#ix=2jYg |
01:40:18 | FromGitter | <bung87> @ disruptek @ leorize @ Yardanico thank you,finally it works out. |
01:42:01 | zacharyc1rter | are sequences nil by default with `--gc:arc`? |
01:42:06 | Yardanico | no? |
01:42:10 | Yardanico | they're still just empty |
01:42:14 | zacharyc1rter | interesting... |
01:42:19 | zacharyc1rter | let me see if I can reproduce this then |
01:43:30 | FromDiscord | <codic> Figured out how to use a label |
01:43:33 | FromDiscord | <codic> just need to align the buttons |
01:44:26 | FromDiscord | <codic> (And how do I make nigui use the system font?) |
01:45:33 | * | endragor joined #nim |
01:46:14 | FromDiscord | <codic> the font is a bit to small for my taste |
01:46:22 | FromDiscord | <codic> and not the font family my system uses |
01:46:43 | zacharyc1rter | https://play.nim-lang.org/#ix=2jYz |
01:47:24 | zacharyc1rter | I don't know if this is worth filing an issue for or not - but I thought with `-d:useMalloc` asan would work |
01:49:23 | FromDiscord | <codic> Nooo I'm doomed |
01:49:24 | FromDiscord | <codic> No nigui docs |
01:50:16 | Yardanico | check out examples |
01:50:23 | disruptek | nim doc |
01:50:26 | Yardanico | there's 17 of them |
01:50:28 | Yardanico | https://github.com/trustable-code/NiGui/tree/master/examples |
01:51:15 | * | chemist69 joined #nim |
01:51:16 | Yardanico | and simple search already gives stuff like https://github.com/trustable-code/NiGui/blob/84a2b5c326658460d213b540e4f122b422deb5d6/examples/example_10_drawing.nim#L54 |
01:51:22 | Yardanico | to change font family and stuff |
01:54:26 | * | chemist69_ quit (Ping timeout: 260 seconds) |
01:56:42 | FromDiscord | <codic> oh, great |
01:56:52 | FromDiscord | <codic> Can't I get it to use the *system*'s tho |
02:06:26 | FromDiscord | <codic> or specify a ttf file |
02:07:22 | * | nickster0 joined #nim |
02:07:40 | * | nickster0 quit (Client Quit) |
02:08:54 | * | liblq-dev quit (Ping timeout: 246 seconds) |
02:09:34 | * | krux02 quit (Remote host closed the connection) |
02:12:39 | * | endragor quit (Remote host closed the connection) |
02:12:45 | * | endragor joined #nim |
02:13:43 | zacharyc1rter | https://github.com/nim-lang/Nim/issues/14156 |
02:13:46 | disbot | β₯ Sequences not initialized correctly with `--gc:arc` according to as an ; snippet at 12https://play.nim-lang.org/#ix=2jYK |
02:19:32 | FromDiscord | <KingDarBoja> π Hi guys |
02:19:36 | zacharyc1rter | hi |
02:20:58 | FromGitter | <KingDarBoja> What's up? :D |
02:23:24 | Yardanico | hi, good night |
02:23:31 | Yardanico | 5:23 AM π€ |
02:23:49 | FromDiscord | <KingDarBoja> 9:23 PM |
02:24:07 | disruptek | lua is fast. |
02:24:17 | Yardanico | luajit is lightning fast |
02:24:39 | FromDiscord | <KingDarBoja> Okay, Lua time it seems |
02:24:52 | disruptek | well, i figured out my bug. |
02:24:58 | Yardanico | what was it? |
02:26:58 | disruptek | relative stack index became invalid due to mutation needed in order to query that same index. |
02:27:15 | disruptek | kinda fucked up. |
02:28:35 | zacharyc1rter | luajit is also unmaintained |
02:28:50 | * | muffindrake quit (Ping timeout: 244 seconds) |
02:28:52 | Yardanico | there's a maintained fork |
02:28:58 | disruptek | the binding i'm using only supports 5.1. it's fine. |
02:28:59 | Yardanico | moonjit |
02:29:02 | zacharyc1rter | yeah but without the original author |
02:29:11 | zacharyc1rter | whatever his name is - mike something |
02:29:23 | zacharyc1rter | that dude was a genius |
02:29:26 | zacharyc1rter | or is a genius |
02:29:30 | zacharyc1rter | no idea what he's up to now |
02:29:40 | zacharyc1rter | Mike Pall |
02:30:04 | Yardanico | yeah that's true |
02:30:39 | disruptek | i thought i was only gonna use this for data, but... |
02:30:51 | Yardanico | https://repo.or.cz/w/luajit-2.0.git |
02:30:53 | Yardanico | seems to be not dead |
02:30:56 | Yardanico | He actually makes commits |
02:31:10 | * | muffindrake joined #nim |
02:31:11 | Yardanico | https://repo.or.cz/luajit-2.0.git/commit/179cf2eb84fef2b9a524469c3c8cc49363b8fb10 10 hours ago |
02:31:28 | zacharyc1rter | that's good |
02:31:41 | disruptek | iirc there's a 5.2 branch. |
02:32:02 | leorize | I'd expect luajit to still be alive |
02:32:14 | leorize | neovim is using it as it's internal scripting engine |
02:32:28 | zacharyc1rter | if I didn't have hot reloading working with my plugin system, I'd use luajit |
02:33:29 | disruptek | it hits a real sweet spot. |
02:33:40 | zacharyc1rter | yeah it's nice for sure |
02:33:47 | Yardanico | i think luajit is one of the fastest if not the fastest JIT implementation for an interpreted language |
02:33:56 | zacharyc1rter | I think it is the fastest |
02:34:33 | FromDiscord | <KingDarBoja> What you guys doing? |
02:34:49 | disruptek | ~stream |
02:34:50 | disbot | stream: 11https://twitch.tv/disruptek (live video/audio) and mumble://uberalles.mumbl.io/ (live voice chat) -- disruptek |
02:34:52 | disruptek | ~notes |
02:34:53 | disbot | notes: 11https://gist.github.com/disruptek/41100bf20978de9a3cff55b23fcfe44e -- disruptek |
02:35:01 | Yardanico | your'e still streaming?! |
02:35:02 | Yardanico | wtf |
02:35:10 | Yardanico | ah nvm |
02:35:13 | disruptek | nah. |
02:35:27 | disruptek | by way of explanation... |
02:35:43 | leorize | disruptek: can you make your github module not trying to add an Authorized header when I don't have GITHUB_TOKEN set? |
02:35:57 | disruptek | is that a good idea? |
02:36:16 | leorize | yea, parts of the API don't need that |
02:36:47 | disruptek | hmm, maybe the swagger is wrong. |
02:37:29 | disruptek | you can pass "Authorization" with whatever you want in it. |
02:37:31 | * | Hideki_ quit (Remote host closed the connection) |
02:37:44 | leorize | I don't need it :P |
02:37:57 | leorize | I'm just fetching the latest releases |
02:38:20 | disruptek | oh, do they puke on bad values? |
02:38:27 | leorize | yea |
02:38:31 | FromDiscord | <codic> how do I require a file in a subfolder from another file not in the subfolder? |
02:38:41 | Yardanico | you mean import? |
02:38:45 | FromDiscord | <codic> yeah |
02:38:45 | zacharyc1rter | so I think the entire `--gc:arc` thread issue is related to the issue I Just found with seqs and asan |
02:38:46 | Yardanico | import folder/file |
02:38:47 | * | Hideki_ joined #nim |
02:38:50 | FromDiscord | <codic> o |
02:38:57 | FromDiscord | <codic> and `import file` to import the file in the current dir? |
02:39:01 | Yardanico | yes |
02:39:04 | leorize | codic: import "../another folder" / file |
02:39:09 | FromDiscord | <codic> but what if there is a module installed with nimble with the same name |
02:39:13 | FromDiscord | <codic> as the file |
02:39:13 | zacharyc1rter | nevermind it's not |
02:39:21 | FromDiscord | <codic> which takes precedence, and how do I choose? |
02:39:23 | leorize | your file take precedence |
02:39:23 | Yardanico | import ./folder/file |
02:39:47 | leorize | you can choose the package via `import pkg / module_here` |
02:40:09 | leorize | `pkg` is a special prefix for packages |
02:40:12 | FromDiscord | <codic> o |
02:40:14 | FromDiscord | <codic> great |
02:41:33 | FromDiscord | <KingDarBoja> That's a lot of stuff |
02:42:47 | FromDiscord | <KingDarBoja> But awesome |
02:43:18 | * | Hideki_ quit (Ping timeout: 244 seconds) |
02:43:38 | FromDiscord | <KingDarBoja> You gained a new follower β€οΈ |
02:44:48 | Yardanico | to see nim repos updated in last few days |
02:44:48 | Yardanico | https://github.com/search?o=desc&q=language%3Anim+pushed%3A%3E2020-04-27&s=updated&type=Repositories |
02:44:53 | Yardanico | sorted by last commit |
02:45:00 | * | Hideki_ joined #nim |
02:46:00 | FromDiscord | <KingDarBoja> Holy cr*p, look at arraymancer D: |
02:46:14 | * | Hideki_ quit (Remote host closed the connection) |
02:46:18 | Yardanico | yes |
02:46:23 | Yardanico | also weave |
02:46:59 | leorize | mratsim's projects are always cool |
02:48:14 | Yardanico | zacharyc1rter: what happened with https://github.com/nim-lang/Nim/issues/14156 ? |
02:48:16 | disbot | β₯ Disregard - not an issue |
02:49:25 | Yardanico | also btw I tried https://github.com/def-/nimes with --gc:arc and it segfaults at some array access? |
02:49:36 | Yardanico | works with default gc just fine even though no commits in 1.5 years :P |
02:51:03 | * | Hideki_ joined #nim |
02:53:10 | * | liblq-dev joined #nim |
02:55:52 | * | Hideki_ quit (Ping timeout: 265 seconds) |
03:14:21 | disruptek | leorize: github 1.0.4 |
03:14:43 | * | azed quit (Quit: WeeChat 2.8) |
03:20:33 | * | Hideki_ joined #nim |
03:24:49 | * | Hideki_ quit (Ping timeout: 246 seconds) |
03:29:42 | shashlick | @gogolxdong in case you see this - https://github.com/Microsoft/msquic |
03:33:26 | disruptek | seems like nimph is broken in devel. |
03:34:04 | disruptek | what's weird is, it crashes deep in config parsing code from the compiler. |
04:04:08 | FromDiscord | <Zed> is it better to use when isMainModule or create a main proc and then call that? |
04:04:24 | FromDiscord | <Zed> im used to coding in c and having to use a main function |
04:06:02 | * | supakeen quit (Quit: WeeChat 1.9.1) |
04:06:23 | disruptek | it's better to use a main proc for very subtle are generally irrelevant reasons. |
04:06:31 | disruptek | s/are/and/ |
04:06:42 | * | supakeen joined #nim |
04:07:38 | FromDiscord | <Zed> so mainly so you can import it from another file? |
04:07:40 | disruptek | shashlick: weirdly, it looks like gittyup was broken by devel this week. so everything is dead. |
04:07:53 | disruptek | no, other more subtle reasons. |
04:08:09 | disruptek | like iterator vars not getting reset at toplevel scope. |
04:08:36 | FromDiscord | <Zed> ah ok |
04:08:37 | disruptek | and soon, increment compilation caching. π |
04:08:47 | disruptek | incremental, too. |
04:17:28 | zacharyc1rter | is there a way to manually increment a reference with `--gc:arc`? |
04:18:11 | zacharyc1rter | like an equivalent of `gcRef`? Or should I just create a pointer to the object? |
04:20:13 | leorize | I thought there's still GC_ref for arc? |
04:20:20 | leorize | yea that's still there |
04:20:24 | zacharyc1rter | hmm |
04:21:49 | voltist | shashlick: You are genotrance right? |
04:22:00 | shashlick | Yep |
04:22:18 | leorize | Zed: also an undocumented fact: your code runs faster in a main() proc |
04:23:33 | voltist | Cool. I'm just updating a spare Manjaro machine I have so I can test to see if the choosenim issue is present. Manjaro is very much Arch based, so if it works there then the issue must arise from one of the few differences |
04:23:54 | FromDiscord | <Zed> ok dumb question, |
04:23:54 | FromDiscord | <Zed> i have 2 functions `proc initSomething*()` and `proc initOtherThing()` |
04:23:55 | FromDiscord | <Zed> I'm getting an error when trying to use the initOtherThing function inside of initSomething, do i have to import the function or something? |
04:24:16 | shashlick | Ya I tested a docker image of Arch and couldn't reproduce the issue |
04:24:22 | voltist | And that difference should also be present in the Arch linux Docker image that you tested, so that might narrow things down a bit |
04:24:23 | voltist | Yeah |
04:24:29 | FromDiscord | <Zed> leorize: why would that be, probably something interesting to look into |
04:24:49 | leorize | top-level stuff are considered to be "global" |
04:25:00 | leorize | so certain optimizations couldn't work there |
04:25:00 | shashlick | Ya if you can get it to fail in a docker image, will be easy to root cause |
04:25:20 | FromDiscord | <Zed> ah yeah that makes sense |
04:25:50 | shashlick | Windows CI on Travis is so slow compared to Linux |
04:26:14 | shashlick | @leorize how's the performance on azure pipelines |
04:26:22 | voltist | shashlick: I tried the docker image as well (essentially recreated my new-ish install that it failed on) and couldn't reproduce the issue either |
04:26:47 | leorize | shashlick: faster than travis could ever be |
04:27:02 | leorize | github actions also works if you don't want to sign up for a microsoft account |
04:27:13 | shashlick | Azure yml files seem a lot more complicated |
04:27:22 | shashlick | Don't feel motivated to sit and learn that |
04:27:54 | leorize | it just separate things into steps |
04:28:04 | shashlick | Could you create something like https://gist.github.com/genotrance/fb53504a4fba88bc5201d3783df5c522 for azure |
04:28:08 | leorize | azure model is pretty cool, you can create a template and everyone can reference it |
04:29:12 | leorize | yes, and I can even put it on a public repo and everyone can reference it from their azure yml :) |
04:29:21 | leorize | I'll give it a go later |
04:29:44 | voltist | shashlick: Here is one possible lead. The arch install it failed on was the using the image provided by Linode; perhaps the docker image is the 'true' version and the Linode one is broken. |
04:30:10 | shashlick | That will be great - one stop shop to get azure working for Nim |
04:30:24 | shashlick | Thanks in advance |
04:31:07 | shashlick | @voltist could be but it's weird nonetheless |
04:31:20 | voltist | Indeed |
04:33:20 | voltist | shashlick: What we really need is for more people who actually run Arch Linux to contribute to the troubleshooting |
04:33:46 | voltist | I've tried installing it in the past, and I do not want to go through that again :) |
04:34:02 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
04:34:49 | * | zacharyc1rter quit (Ping timeout: 246 seconds) |
04:35:10 | * | zacharycarter quit (Ping timeout: 246 seconds) |
04:35:35 | leorize | never thought that people running Arch would be a rare sight :P |
04:36:13 | voltist | Yeah |
04:37:00 | * | rockcavera quit (Remote host closed the connection) |
04:37:07 | voltist | Maybe it's those three who just left IRC. They were the Arch users among us... |
04:37:11 | voltist | 4 in fact |
04:37:53 | FromDiscord | <KingDarBoja> Guys, how can I use external std modules on nim playground? |
04:37:59 | FromDiscord | <KingDarBoja> Like unicodeplus |
04:38:31 | FromDiscord | <Yardanico> Wdym "external std" |
04:38:54 | FromDiscord | <Yardanico> And you can only use some packages which are available on playground |
04:39:03 | leorize | !repo nim-playground |
04:39:05 | disbot | https://github.com/inim-repl/INim -- 9INim: 11Interactive Nim Shell / REPL / Playground 15 247β 19π΄ 7& 18 more... |
04:39:13 | leorize | !repo PMunch/nim-playground |
04:39:14 | disbot | https://github.com/PMunch/nim-playground-frontend -- 9nim-playground-frontend: 11The front-end for https://play.nim-lang.org 15 11β 4π΄ |
04:39:21 | leorize | !repo PMunch/playground |
04:39:22 | disbot | https://github.com/PMunch/nim-playground-frontend -- 9nim-playground-frontend: 11The front-end for https://play.nim-lang.org 15 11β 4π΄ |
04:40:05 | leorize | https://github.com/PMunch/nim-playground |
04:40:10 | leorize | ^ PR welcome |
04:40:23 | leorize | also disruptek, you should look into why disbot couldn't show me this one repo :P |
04:40:26 | FromDiscord | <Yardanico> https://github.com/PMunch/nim-playground/blob/master/docker/packages.nimble |
04:40:41 | FromDiscord | <KingDarBoja> I see Yard |
04:40:52 | FromDiscord | <Yardanico> And it actually has unicodeolus |
04:40:57 | FromDiscord | <Yardanico> *plus |
04:41:14 | leorize | ping PMunch to check for the packages when he come online then |
04:42:31 | FromDiscord | <KingDarBoja> Okay |
04:42:53 | FromDiscord | <KingDarBoja> I just checked source code of unicodeplus proc isAlpha |
04:42:54 | FromDiscord | <KingDarBoja> https://nitely.github.io/nim-unicodeplus/#isAlpha%2Cstring |
04:43:24 | FromDiscord | <KingDarBoja> Seems like if I provide a printable rune which is not an ascii letter, it will be true anyway |
04:43:39 | FromDiscord | <KingDarBoja> As it has an else branch to check by category π€ |
04:44:51 | leorize | try unicode.isAlpha i guess |
04:44:54 | FromDiscord | <KingDarBoja> Seems I better do the check with the int range |
04:46:06 | FromDiscord | <KingDarBoja> Yields true |
04:46:18 | * | zacharyc1rter joined #nim |
04:46:18 | * | zacharycarter joined #nim |
04:46:50 | FromDiscord | <KingDarBoja> Should better use rune.int is in range 65 - 90 or 97 - 122 |
04:50:10 | FromDiscord | <KingDarBoja> It does -> (c.unicodeCategory() in ctgL or utmDigit+utmDecimal+utmNumeric in c.unicodeTypes()) |
05:07:39 | FromDiscord | <KingDarBoja> Solved it π |
05:08:10 | * | zacharyc1rter quit (Ping timeout: 260 seconds) |
05:08:10 | * | zacharycarter quit (Ping timeout: 260 seconds) |
05:11:17 | * | hoijui joined #nim |
05:11:24 | * | narimiran joined #nim |
05:18:41 | Zevv | Yardanico: yeah, don't use npeg for these kind of things if you're concerned about performance. |
05:20:39 | FromGitter | <gogolxdong> @shashlick, thanks for remembering that. It will be helpful. |
05:21:35 | * | liblq-dev quit (Quit: WeeChat 2.7.1) |
05:21:55 | shashlick | π:skin-tone-3: |
05:21:59 | * | Hideki_ joined #nim |
05:27:24 | * | hoijui quit (Quit: Leaving) |
05:29:18 | * | Hideki_ quit (Remote host closed the connection) |
05:29:28 | FromDiscord | <KingDarBoja> How I can check installed package version, i.e. unicodeplus version |
05:29:32 | * | Hideki_ joined #nim |
05:29:32 | FromDiscord | <KingDarBoja> Using nimble |
05:30:22 | FromDiscord | <Zed> nimble list -i |
05:30:45 | FromDiscord | <Zed> lists all installed packages and their version |
05:31:25 | shashlick | `nimble list -i --ver` |
05:31:41 | shashlick | heh you don't need the --ver |
05:32:23 | FromDiscord | <Zed> How do you declare a function inforward declaration? |
05:32:34 | FromDiscord | <Zed> just the function header and then i fill it in later |
05:32:47 | FromDiscord | <KingDarBoja> I just noticed I can't declare `requires unicodeplus == 0.6.0` on mypackage.nimble file |
05:32:54 | FromDiscord | <KingDarBoja> Instead, I must use `>=` |
05:35:09 | * | dddddd quit (Ping timeout: 258 seconds) |
05:37:58 | lqdev[m] | you can use `requires "unicodeplus 0.6.0"` |
05:52:00 | * | liblq-dev joined #nim |
05:59:45 | leorize[m] | Zed: to forward declare, just write the function without the `=` at the end |
06:01:06 | FromDiscord | <Zed> yeah i realised that not long after sending it |
06:12:28 | * | leorize quit (Remote host closed the connection) |
06:13:24 | * | leorize joined #nim |
06:22:25 | * | solitudesf joined #nim |
06:39:03 | * | bab joined #nim |
06:39:36 | * | Hideki_ quit (Remote host closed the connection) |
06:40:15 | * | Hideki_ joined #nim |
06:44:15 | * | Hideki_ quit (Ping timeout: 240 seconds) |
06:45:39 | * | PMunch joined #nim |
06:52:06 | * | martinium quit (Remote host closed the connection) |
06:53:51 | * | Hideki_ joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:04:55 | * | gmpreussner joined #nim |
07:06:31 | * | Hideki_ quit (Remote host closed the connection) |
07:07:21 | * | Hideki_ joined #nim |
07:11:50 | * | Hideki_ quit (Ping timeout: 260 seconds) |
07:12:36 | * | ptdel quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
07:21:30 | * | ryan_ joined #nim |
07:23:50 | * | number_two quit (Ping timeout: 256 seconds) |
07:35:56 | FromGitter | <bung87> https://github.com/nim-lang/zip/pull/52 can this get merged? |
07:35:57 | disbot | β₯ add zip_source_buffer_create,zip_open_from_source to libzip,fromBuffeβ¦ |
07:38:46 | * | ryan_ is now known as tanger |
07:40:24 | PMunch | Speaking of things that can be merged: https://github.com/nim-lang/packages/pull/1444 |
07:40:26 | disbot | β₯ Add ansiparse and ansitohtml packages |
07:41:27 | * | hax-scramper quit (Read error: Connection reset by peer) |
07:41:47 | * | hax-scramper joined #nim |
07:45:06 | * | Hideki_ joined #nim |
07:53:01 | FromGitter | <bung87> after nimble reinstall dep lib need more step? it still use old version |
07:57:15 | FromGitter | <bung87> ignore this. |
07:57:56 | * | Hideki_ quit (Remote host closed the connection) |
07:58:35 | * | Hideki_ joined #nim |
08:03:07 | * | Hideki_ quit (Ping timeout: 258 seconds) |
08:05:26 | * | CcxWrk quit (Ping timeout: 260 seconds) |
08:07:00 | * | ryan_ joined #nim |
08:08:17 | FromGitter | <Bennyelg> hey how can I remove nimcache from my project ? where does it placed ? |
08:09:00 | FromGitter | <Bennyelg> I suspect that there is a bug when running several delete statements on nim simple loop |
08:09:49 | * | tanger quit (Ping timeout: 264 seconds) |
08:09:53 | * | hax-scramper quit (Quit: Quit) |
08:09:53 | FromGitter | <Vindaar> @Bennyelg the cache is in `~/.cache/nim/<project>` |
08:10:08 | FromGitter | <Vindaar> but if unsure you can also just hand `-f` to your nim call to force a full rebuild |
08:10:10 | * | hax-scramper joined #nim |
08:10:29 | FromGitter | <Bennyelg> /Users/benny/.choosenim/toolchains/nim-1.2.0/lib/system/fatal.nim(49) sysFatal β Error: unhandled exception: index 1 not in 0 .. 0 [IndexError] |
08:10:32 | FromGitter | <Bennyelg> so wierd |
08:10:51 | FromGitter | <Bennyelg> @Vindaar Well so its not that |
08:11:08 | FromGitter | <Bennyelg> I run it β nim c -r "/Users/benny/DLM/backend/src/database/database.nim" |
08:13:16 | FromGitter | <Bennyelg> ```code paste, see link``` β β What Im doing wrong - looks like everything is deleted but fatal is raised [https://gitter.im/nim-lang/Nim?at=5ea9371b5cd4fe50a3da34a8] |
08:13:56 | FromGitter | <Vindaar> Since you're getting an index error, I assume the problem is in line `let tableName ...` ? |
08:14:06 | FromGitter | <Vindaar> Maybe one of those split calls doesn't do what you think it does |
08:14:07 | * | hax-scramper quit (Remote host closed the connection) |
08:14:13 | FromGitter | <Bennyelg> Output: β β ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ea93754a9de3d01b1d8001a] |
08:14:23 | * | hax-scramper joined #nim |
08:14:28 | FromGitter | <Vindaar> see, it's complaining about line 22 :) |
08:14:37 | FromGitter | <Bennyelg> thanks I'll check |
08:16:07 | * | hax-scramper quit (Client Quit) |
08:18:49 | * | narimiran quit (Ping timeout: 264 seconds) |
08:21:52 | * | Hideki_ joined #nim |
08:26:22 | * | Hideki_ quit (Remote host closed the connection) |
08:27:15 | * | Hideki_ joined #nim |
08:31:38 | * | Hideki_ quit (Ping timeout: 260 seconds) |
08:36:55 | * | ftsf_ joined #nim |
08:39:31 | * | ftsf quit (Ping timeout: 265 seconds) |
08:46:30 | * | ryan_ is now known as Kongir |
08:47:24 | FromDiscord | <flywind> I want to import one module in nimble which has the same name in `stdlib`, when I use `import module` which one will be searched first? |
08:48:42 | dom96 | stdlib |
08:49:22 | FromDiscord | <flywind> thanks, I will rename it. |
08:54:05 | * | couven92 joined #nim |
08:55:35 | liblq-dev | I just tried to do something with soundio again, so I updated my wrapper to support latest nimterop but now for some reason I get a segv |
08:55:51 | liblq-dev | (that reason is that the write callback seems to be null, which is really weird) |
08:56:17 | Araq | liblq-dev, compile with --gc:arc and run valgrind |
08:56:51 | liblq-dev | Araq: my code is incompatible with ARC, it has a bunch of pointer casting with refs which prevents destructors from being generated properly |
08:57:04 | liblq-dev | should I just create my own `destroy=` procs? |
08:57:10 | liblq-dev | how would I go about doing that? |
08:57:39 | Araq | what does that mean "prevent destructors from being generated properly"? |
08:57:56 | Araq | sounds like a bug you should have reported |
08:58:12 | Araq | in fact, it sounds like the bug I fixed yesterday... |
08:58:13 | liblq-dev | Araq: Error: cannot bind another '=destroy' to: RAudioDeviceObj; previous declaration was constructed here implicitly: /home/daknus/Coding/Nim/rapid/src/rapid/audio/device.nim(41, 14) |
08:58:30 | Araq | oh that one, reorder your procs |
08:59:22 | liblq-dev | how should I reorder them? |
08:59:47 | liblq-dev | like, what order |
08:59:56 | Araq | it tells you, "was constructed here" |
09:00:15 | Araq | so that must move below your =destroy / finalizer |
09:01:39 | liblq-dev | oh right |
09:03:22 | liblq-dev | ok, seems to compile now |
09:05:38 | * | hax-scramper joined #nim |
09:05:45 | liblq-dev | wow, that valgrind output's really clean |
09:05:58 | liblq-dev | I should use ARC a lot more |
09:06:43 | * | narimiran joined #nim |
09:07:26 | liblq-dev | so it seems like there's an invalid write at https://github.com/nim-lang/Nim/blob/version-1-2/lib/system/threads.nim#L307 but I don't see anything else |
09:07:55 | liblq-dev | how can I disable segv checks? |
09:08:05 | liblq-dev | so that valgrind can detect them |
09:23:10 | Araq | liblq-dev, compile with -d:noSignalHandler |
09:24:31 | liblq-dev | well, problem is that the backtrace points to createThread in the main thread, but the error actually occurs in another thread |
09:25:51 | liblq-dev | the backtrace that valgrind gives me, that is |
09:26:34 | Araq | there are other sanitizers beyond valgrind |
09:27:04 | Araq | I don't have much experience with valgrind plus multi threading, sorry |
09:27:25 | Araq | oh and also use -d:useMalloc |
09:27:25 | * | clyybber joined #nim |
09:27:38 | Araq | otherwise valgrind is kinda blind |
09:31:00 | * | ccx quit (Ping timeout: 256 seconds) |
09:31:56 | liblq-dev | can you recommend a different memory sanitizer? |
09:32:39 | PMunch | What does Nim do when you don't have -d:useMalloc? |
09:33:09 | hax-scramper | I'm trying to concatenate `static` parameters in generic (proc takes two types with `array[N1, string]` and `array[N2, string]` as generic parameters and type of return is `array[N1 + N2, string]`). I'm getting compilation error `cannot instantiate U. got: <N1, static[type static[array[0..<invalid value>, string]]]([type node])> |
09:33:10 | hax-scramper | but expected: <N, T>`. The code is here: https://play.nim-lang.org/#ix=2k0w |
09:34:01 | Araq | PMunch, it uses our own O(1) allocator |
09:34:23 | Araq | (which is usually faster, but not always) |
09:34:45 | clyybber | Araq: Were you talking about bugs with gc:orc? Does it work with async? |
09:34:59 | * | ccx joined #nim |
09:35:28 | Araq | https://github.com/nim-lang/Nim/issues/14079 this one for example |
09:35:30 | disbot | β₯ algorithm.sortedByIt template corrupts tuple input under --gc:arc ; snippet at 12https://play.nim-lang.org/#ix=2k0A |
09:35:43 | Araq | or what about the bug that keeps 'koch boot --gc:arc' from working? |
09:35:46 | clyybber | Ok, I will investigate |
09:36:00 | Araq | well I'm on #14079 already |
09:36:01 | disbot | https://github.com/nim-lang/Nim/issues/14079 -- 3algorithm.sortedByIt template corrupts tuple input under --gc:arc ; snippet at 12https://play.nim-lang.org/#ix=2k0A |
09:36:05 | clyybber | Ah ok |
09:36:15 | Araq | but it would be nice if 'koch boot' worked |
09:36:20 | clyybber | The koch boot --gc:arc bug is because we have too much temporaries |
09:36:37 | Araq | well fix it please |
09:36:40 | clyybber | Araq: Is there a proc in the compiler to tell wether a conversion returns an lvalue or rvalue? |
09:36:42 | liblq-dev | Araq: well anyways, valgrind doesn't help much, but GDB gave me a useful stack trace and from what I can tell what happens is a null pointer function call |
09:36:49 | liblq-dev | I'm just unable to track down why it happens |
09:37:24 | Araq | clyybber, no, I usually assume that conversions are lvalues fwiw |
09:37:43 | clyybber | Ok |
09:38:11 | Araq | and once --gc:arc works for bootstrapping, we should test --gc:orc |
09:38:24 | Araq | but I have a novel optimization for --gc:orc in the pipeline |
09:38:31 | * | chemist69 quit (Ping timeout: 272 seconds) |
09:38:38 | PMunch | Hmm, I have more questions, but it hits me that it's probably just because I don't really know how memory allocation actually works low-level |
09:38:57 | liblq-dev | so, for some reason it crashes on createThread on ARC |
09:39:00 | PMunch | I thought malloc was basically a kernel call |
09:39:19 | * | chemist69 joined #nim |
09:39:36 | Araq | PMunch, no the kernel call is usually 'mmap'. malloc is not in the kernel because it would be too slow |
09:40:00 | Araq | liblq-dev, also try --tlsEmulation:off please |
09:40:27 | liblq-dev | nope, didn't do anything |
09:40:57 | Araq | and also --exceptions:setjmp |
09:41:29 | liblq-dev | nothing |
09:41:36 | Araq | which OS are you on? |
09:41:42 | liblq-dev | linux |
09:41:53 | liblq-dev | the crash happens right here https://github.com/nim-lang/Nim/blob/15ba765ebd83e44d18a0a2c23016bdf3b4bbecca/lib/system/threads.nim#L307 |
09:42:13 | liblq-dev | which seems weird as it's just a memory allocation |
09:43:13 | clyybber | dom96: Is there a way to grep the irc logs? |
09:43:25 | clyybber | I wrote down some stuff on the bug I want to fix but forgot what it was |
09:44:25 | dom96 | the only way is to look at each day and search it |
09:44:34 | dom96 | manually :) |
09:44:41 | clyybber | damn |
09:47:25 | PMunch | Yeah.. I've been thinking about writing an indexing bot for exactly this usecase.. |
09:47:43 | PMunch | And to create graphs and such |
09:47:58 | * | exelotl joined #nim |
09:48:42 | dom96 | I need to modify NimBot to expose these as pure json |
09:48:46 | dom96 | should make it easier |
09:50:50 | * | hax-scramper left #nim ("ERC (IRC client for Emacs 26.3)") |
09:51:01 | * | ccx quit (Quit: WeeChat 2.4) |
09:51:20 | * | CcxWrk joined #nim |
09:52:07 | clyybber | Oh, I wrote it down on github too it seems |
09:52:42 | * | CcxCZ joined #nim |
09:52:48 | * | hax-scramper joined #nim |
09:55:20 | * | exelotl_ joined #nim |
09:59:25 | * | exelotl quit (Ping timeout: 272 seconds) |
10:15:36 | FromDiscord | <flywind> Today it seems travis had some problems with downloading Nim using choosenim. |
10:15:55 | FromDiscord | <flywind> https://travis-ci.org/github/iocrate/netkit/jobs/680904654 |
10:16:04 | FromDiscord | <flywind> https://travis-ci.org/github/planety/prologue/jobs/680939844 |
10:16:52 | * | liblq-dev quit (Quit: WeeChat 2.8) |
10:17:46 | * | solitudesf quit (Read error: Connection reset by peer) |
10:18:12 | dom96 | looks like whoever is hosting the binaries is not liking the number of requests we are sending |
10:18:14 | * | liblq-dev joined #nim |
10:18:54 | * | solitudesf joined #nim |
10:20:27 | * | liblq-dev quit (Client Quit) |
10:20:39 | * | liblq-dev joined #nim |
10:24:57 | * | lritter joined #nim |
10:28:49 | * | Hideki_ joined #nim |
10:32:41 | * | NimBot joined #nim |
10:34:51 | * | liblq-dev quit (Quit: WeeChat 2.8) |
10:39:07 | * | liblq-dev joined #nim |
10:43:08 | FromGitter | <alehander92> PMunch yeah i wanted to see |
10:43:23 | FromGitter | <alehander92> how much i spam here |
10:43:24 | FromGitter | <alehander92> :D |
10:43:26 | FromGitter | <alehander92> show me a graph |
10:45:13 | PMunch | Haha, yeah things like that |
10:45:16 | PMunch | Who are the biggest posters |
10:45:25 | PMunch | How long do new users stay in the channel |
10:45:27 | PMunch | etc. |
10:47:15 | * | Hideki_ quit (Ping timeout: 240 seconds) |
10:48:17 | * | Hideki_ joined #nim |
10:49:39 | * | Hideki_ quit (Remote host closed the connection) |
10:49:42 | FromGitter | <alehander92> yea |
10:50:49 | * | krux02 joined #nim |
10:53:19 | FromDiscord | <Recruit_main707> Zevv, can you use nim on an arduino emulator?? |
10:54:05 | * | Hideki_ joined #nim |
10:58:34 | * | Hideki_ quit (Ping timeout: 260 seconds) |
10:59:08 | PMunch | Recruit_main707, I did manage to run it on the Arduboy emulator |
10:59:34 | PMunch | So I'd say an arduino emulator shouldn't be a problem |
10:59:40 | FromDiscord | <Recruit_main707> how hard was it? |
10:59:59 | Araq | clyybber, or work on some other "showstopper" bug please |
11:06:02 | clyybber | Araq: This is a showstopper IMO. The actual bug is not exclusive to gc:arc either |
11:07:31 | * | Kaivo joined #nim |
11:10:01 | * | ryan_ joined #nim |
11:12:49 | * | Kongir quit (Ping timeout: 264 seconds) |
11:15:13 | * | Guest68929 quit (Ping timeout: 246 seconds) |
11:16:31 | * | dadada joined #nim |
11:16:55 | * | dadada is now known as Guest29432 |
11:22:42 | * | Trustable joined #nim |
11:27:56 | * | Hideki_ joined #nim |
11:38:27 | * | rockcavera joined #nim |
11:39:03 | Araq | clyybber, which one? |
11:39:47 | clyybber | This one: |
11:39:49 | clyybber | type |
11:39:50 | clyybber | TPassContext = object of RootObj |
11:39:52 | clyybber | PPassContext = ref TPassContext |
11:39:54 | clyybber | PCtx = ref object of TPassContext |
11:39:56 | clyybber | a: int |
11:39:58 | clyybber | ModuleGraph = object |
11:40:00 | clyybber | vm: RootRef |
11:40:02 | clyybber | proc main() = |
11:40:04 | clyybber | var g = ModuleGraph(vm: new(Pctx)) |
11:40:06 | clyybber | PPassContext(PCtx(g.vm)) = nil #This compiles, but crashes at runtime with gc:arc |
11:40:08 | clyybber | #PCtx(g.vm) = nil #This generates invalid C code |
11:40:10 | clyybber | main() |
11:40:12 | clyybber | |
11:40:24 | clyybber | Oh sorry, this is the case which only crashes with gc:arc |
11:41:29 | clyybber | This is the one: http://ix.io/2k1p |
11:41:44 | clyybber | This generates invalid C code regardless of which gc we choose |
11:42:29 | Araq | well now you know what to work on. ;-) |
11:42:48 | clyybber | Thats what I'm doing :) |
11:49:53 | shashlick | @liblq-dev: not sure if your crash is nimterop related but try `flags = "-H"` for your cImport call |
11:50:07 | krux02 | Araq, It would have been nice if you told me that you are going to remove me from the Nim organization |
11:50:08 | liblq-dev | what does that do? |
11:50:08 | shashlick | If you are trying #head |
11:52:11 | shashlick | https://github.com/nimterop/nimterop/issues/169 |
11:52:12 | disbot | β₯ Skip `{.header.}` generation |
11:52:46 | * | Hideki_ quit (Ping timeout: 260 seconds) |
11:52:59 | shashlick | Basically -H adds the {.header.} pragma |
11:53:09 | Araq | krux02, when I did that I had no idea I could still talk with you reasonably about anything |
11:53:31 | shashlick | It was the default in 0.4.4 but is now opt in |
11:54:26 | shashlick | If it fixes your issue then I'll have to reconsider since it will be the second crash |
11:54:49 | shashlick | However it could also be a wrapper gen bug but need more info to debug |
12:06:02 | * | supakeen quit (Quit: WeeChat 1.9.1) |
12:06:47 | * | supakeen joined #nim |
12:07:19 | shashlick | @Clyybber - your challenges with nimterop are hopefully fixed in master - it can now detect the config instead of depending on nimble |
12:07:36 | shashlick | Appreciate some testing when you get a chance |
12:08:24 | * | Vladar joined #nim |
12:14:08 | * | jegfish joined #nim |
12:15:05 | liblq-dev | shashlick: but how would {.header.} affect runtime though? |
12:16:30 | shashlick | Haven't dug into it but it's worth checking |
12:19:47 | shashlick | https://nim-lang.github.io/Nim/manual.html#implementation-specific-pragmas-header-pragma |
12:20:39 | shashlick | Basically you are using the C type directly in the code so the size, etc will be exactly how it's defined |
12:21:12 | clyybber | shashlick: Nice, I'll test it later! |
12:21:12 | shashlick | @leorize suggested there are cases where headers hide details but I'm not sure how that works |
12:21:34 | shashlick | My contention is that there could be a bug |
12:21:56 | shashlick | But are you also testing when the new ast2 backend? |
12:22:30 | shashlick | `flags = "-f:ast2"` |
12:22:39 | shashlick | With |
12:32:11 | * | dddddd joined #nim |
12:38:07 | * | jegfish quit (Quit: Leaving) |
12:44:45 | * | Hideki_ joined #nim |
12:45:39 | Zevv | Recruit_main707: I don't see why not |
12:48:54 | * | Hideki_ quit (Ping timeout: 240 seconds) |
12:51:19 | * | Hideki_ joined #nim |
13:01:52 | disruptek | shashlick: you're doing it again. bump more versions, please. |
13:02:26 | clyybber | Hmm, this bug stems from the fact that lvalue casts are not a thing in C. Solution is to cast the address I guess. |
13:02:35 | clyybber | Zevv: Would that violate strict aliasing rules? |
13:03:48 | * | tane joined #nim |
13:04:58 | * | Hideki_ quit (Remote host closed the connection) |
13:05:29 | disruptek | shashlick: something wacky this way comes: https://api.travis-ci.org/v3/job/680316448/log.txt |
13:05:45 | * | Hideki_ joined #nim |
13:07:05 | Araq | clyybber, it wouldn't |
13:07:35 | Araq | strict aliasing is very subtle but don't worry about it, I'm gonna review your PR :P |
13:08:08 | Araq | speaking of which... we compile without strict aliasing with --gc:arc we don't have to do that |
13:10:15 | * | Hideki_ quit (Ping timeout: 240 seconds) |
13:13:03 | * | sunwukong joined #nim |
13:15:50 | * | abm joined #nim |
13:17:53 | * | waleee-cl joined #nim |
13:24:14 | * | Hideki_ joined #nim |
13:24:23 | * | ftsf_ quit (Ping timeout: 246 seconds) |
13:24:37 | shashlick | disruptek: it's a big release with breaking changes so i'm taking my time to tag |
13:24:57 | shashlick | want to transition to ast2 carefully |
13:25:30 | PMunch | https://www.techspot.com/news/85020-lenovo-start-offering-thinkpads-linux-pre-installed.html |
13:25:33 | PMunch | Nice! |
13:26:38 | shashlick | disruptek: looks like i'll have to tag now thanks to that paramCount change |
13:26:53 | shashlick | that's caused a lot of heartburn, what's the value in such a change |
13:27:04 | PMunch | paramCount change? |
13:27:22 | * | Vladar quit (Quit: Leaving) |
13:27:27 | shashlick | https://github.com/nim-lang/Nim/pull/12860 |
13:27:28 | disbot | β₯ Undefine `paramCount` & `paramStr` in nimscript.nim for *.nims |
13:28:31 | Araq | shashlick, I think we need to revert this change |
13:28:48 | Araq | breaks too much code |
13:31:01 | PMunch | Wait, so they just moved into the os module? |
13:31:27 | PMunch | Why not have nimscript just automatically import them from there. Possibly with a deprecation warning? |
13:32:35 | FromGitter | <kaushalmodi> The main issue was that if someone did `import os`, nim complained of ambiguous imports. |
13:32:52 | FromGitter | <kaushalmodi> The upcoming PR proposed by @timotheecour should fix that issue. |
13:33:36 | Araq | from os import paramStr, paramCount |
13:33:59 | Araq | export paramStr, paramCount |
13:34:09 | FromGitter | <kaushalmodi> Araq: Then the user has to keep a manual check on what `os` procs are defined in system + nimscript |
13:34:17 | Araq | should do it, the compiler understands 'export' well and doesn't complain about ambiguous symbols |
13:35:33 | FromGitter | <kaushalmodi> After this is reverted, my `config.nims` will have `import os except existsDir, dirExists, existsFile, fileExists, findExe, paramCount, paramStr` |
13:35:48 | FromGitter | <kaushalmodi> the user should not need to manually track the ambiguous procs between os and system |
13:35:59 | * | xcm quit (Remote host closed the connection) |
13:38:46 | * | Hideki_ quit (Remote host closed the connection) |
13:39:06 | * | Hideki_ joined #nim |
13:39:20 | * | zacharycarter joined #nim |
13:40:25 | Araq | exactly my point... |
13:40:33 | shashlick | Araq: if it genuinely cleans the code, i think we can deal with it but i haven't looked at this with sufficient detail |
13:43:52 | * | xcm joined #nim |
13:44:19 | * | zacharyc1rter joined #nim |
13:45:23 | Araq | well I'm not really into this problem but I don't see why we cannot simply use import+export |
13:45:24 | * | BohlAdmin joined #nim |
13:45:34 | Araq | so that code continues to work |
13:46:08 | * | BohlAdmin left #nim (#nim) |
13:50:10 | disruptek | CORRECT BY CONSTRUCTION |
13:51:08 | FromDiscord | <Rika> caps |
13:51:42 | disruptek | hell yeah caps |
13:51:46 | Araq | disruptek, remember I said Nimscript causes ongoing costs? |
13:51:54 | Araq | and here we are. ;-) |
13:53:35 | shashlick | what's the problem with nimscript.nim today? |
13:53:42 | shashlick | why do you want to get rid of it? |
13:53:54 | disruptek | sometimes i wish this community had more focus. |
13:54:18 | clyybber | community .. focus |
13:54:21 | clyybber | its antithetic |
13:54:39 | disruptek | doesn't have to be. |
13:55:10 | clyybber | has to be antithetic in a "free" community |
13:55:21 | clyybber | what should we focus on IYO? |
13:56:31 | disruptek | rowing in the same direction. |
13:56:43 | clyybber | in which direction? |
13:57:05 | FromGitter | <kaushalmodi> in the direction of config.nims |
13:57:15 | * | xcm quit (Remote host closed the connection) |
13:58:49 | shashlick | what disruptek is saying is that we pick a feature of the week or month and get it in shape as a team |
13:59:29 | * | xcm joined #nim |
14:03:59 | * | nisstyre quit (Quit: WeeChat 2.7) |
14:04:27 | * | PMunch quit (Quit: leaving) |
14:05:35 | * | nisstyre joined #nim |
14:05:50 | * | Hideki_ quit (Remote host closed the connection) |
14:06:08 | disruptek | i think the pipeline of features/fixes needs to be curated. |
14:06:21 | disruptek | focussed. |
14:06:38 | Araq | well it's my fault |
14:06:41 | shashlick | i agree with that |
14:06:44 | * | Hideki_ joined #nim |
14:06:51 | disruptek | yeah, let's pile on araq. |
14:07:08 | Araq | I did the PR week, trying to get as many PRs merged/rejected as I could |
14:07:11 | shashlick | but it's not like we all know all parts of the ecosystem |
14:07:17 | zacharycarter | If I'm using `--gc:arc` and I pass a ref object to another thread, I need to call `GC_ref` corect? When do I then call `GC_unref`? |
14:07:21 | disruptek | that's why we need to work together. |
14:07:29 | shashlick | like if Araq said it's --gc:arc week, i can only do some testing at best |
14:07:35 | zacharycarter | at the end of the threads execution or back in the main thread? |
14:07:54 | disruptek | it's not just about cohesive work, it's about /not/ working on things out of scope. |
14:08:03 | disruptek | so they stay in a control group. |
14:08:20 | disruptek | i can't even CI most of my stuff most of the time because it's failing for one reason or another. |
14:08:23 | Araq | zacharycarter, you don't need the GC_ref/unref dance anymore but you need to ensure you *move* the refs |
14:08:40 | FromGitter | <bung87> does nimble run pass compile flags? |
14:08:44 | shashlick | so a proclamation that only PRs for features X, Y and Z will be accepted? |
14:09:00 | zacharycarter | Araq: but what if I want to keep a copy of the object on the main thread as well? then I can't move right? Not until deepCopy works at least? |
14:09:35 | Araq | why would you do that though, it's a recipe for race conditions |
14:09:48 | shashlick | bung87 - yes per the help |
14:09:55 | * | sunwukong` joined #nim |
14:10:25 | Araq | if you want to do that, write a SharedRef[T] |
14:10:27 | * | sunwukong quit (Read error: Connection reset by peer) |
14:10:55 | * | Hideki_ quit (Ping timeout: 246 seconds) |
14:10:59 | FromGitter | <bung87> `nimble run -d:bundle='/var/folders/j_/rjvv27dx4z594dfdfl7q9_kh0000gn/T/zipBundle.zip' --threads:on ` `defined(bundle)` not true |
14:11:10 | zacharycarter | well I was going to use sync primitives to try to prevent races but it is messy... I guess I need to look at my code and figure out a way to eliminate shared state if possible |
14:12:46 | zacharycarter | but I also see what you mean that `deepCopy` and then `moving` makes no sense either |
14:12:52 | * | Hideki_ joined #nim |
14:12:58 | FromGitter | <bung87> o, I should look carefully |
14:13:07 | clyybber | disruptek: What is out of scope for example? |
14:13:25 | Araq | clyybber, stuff that breaks somebody's code, I think. |
14:13:41 | Araq | unfortunately, our "important package" testing is still insufficient |
14:14:20 | leorize | how do other projects handle this? |
14:14:38 | clyybber | By not testing with the devel compiler I guess |
14:15:25 | clyybber | Similarily to the csize_t thing I think reverting it now would cause even more hassle/work. |
14:16:13 | leorize | we probably should see how other projects do their management |
14:16:30 | leorize | maybe they have some tricks that we don't know of |
14:16:56 | leorize | I don't think "man power" is an issue anymore for Nim |
14:17:48 | Araq | leorize, I think it is in the sense that we don't make good use of our man power |
14:18:12 | disruptek | i really want to write a ci that doesn't suck. |
14:18:44 | Araq | I thought about writing RFCs about what should be developed and spend roughly 100% of my time on code reviews |
14:19:16 | disruptek | roughly. |
14:20:08 | disruptek | the thing is, i like the lesson of "it's not rocket science" but i just don't think it really captures the whole space. |
14:20:18 | disruptek | the rust ci, i mean. |
14:20:19 | leorize | too much of nim is dependent on Araq :/ |
14:20:58 | leorize | what happened to the entire code owners proposal btw? |
14:21:41 | Araq | the other code owners don't get to work 10 hours every day on Nim, it's still a thing though |
14:24:55 | leorize | also I think we should spend a lot more time fixing bugs |
14:25:06 | leorize | the compiler just have too many of them |
14:25:33 | leorize | new features are nice and all, but bugs when using Nim-specific features drive people away |
14:26:23 | Araq | it depends on the bug, most remaining bugs will cause regressions when fixed |
14:26:41 | FromDiscord | <Recruit_main707> is this doable? `proc check_packet_type(packet: JsonNode): GameState or Error =` |
14:26:52 | disruptek | fewer PRs, higher quality. |
14:26:55 | leorize | we have 6 yrs old crashes |
14:27:22 | leorize | I think regressions are fine if they can be justified |
14:27:32 | leorize | ie. tightening up some unspecified parts of the spec |
14:28:15 | leorize | currently the situation with macros/generics is: if it doesn't work, report a bug, then hunt for ways to make it work while you wait for the bug to be fixed |
14:28:31 | disruptek | nimph is only crash-free when built on 1.0 and it cannot determine prefixDir on 1.0, so it cannot function. |
14:28:48 | disruptek | so you build it with 1.0 but you run it against later compilers... that cannot build it. |
14:29:10 | Araq | disruptek, we can fix the later compilers though |
14:29:11 | clyybber | Why do you get crashes on 1.2? |
14:29:26 | disruptek | some kinda openssl alloc bullshit, who cares. |
14:29:36 | clyybber | well, you should? |
14:29:44 | Araq | Recruit_main707: use an Either[T, S] type |
14:29:44 | FromDiscord | <Rika> @Recruit_main707 no |
14:29:51 | FromDiscord | <Rika> what araq said yes |
14:30:09 | disruptek | gittyup failed its cron-job CI after less than a week because of some choosenim/nimterop bug. |
14:30:25 | FromDiscord | <Rika> you can also just make a Result[T, E], which is basically an Either |
14:30:41 | FromDiscord | <Rika> maybe add some helper procs for Result too like isError or something |
14:31:13 | FromDiscord | <Rika> you can also do what golang does, use a tuple |
14:31:16 | FromDiscord | <Rika> but i dont recommend that lol |
14:31:41 | FromDiscord | <Recruit_main707> how does this Either/Result work? |
14:31:46 | Araq | leorize, well ok, crashes are easier as the chance of regressions is lower |
14:31:56 | FromDiscord | <Rika> its an object variant im guessing |
14:32:05 | Araq | and I can give you the missing pieces of the spec too, I wrote them down somewhere |
14:32:28 | leorize | I'm also seeing a huge amount of bugs assigned to zah |
14:32:33 | leorize | but he is not active nowadays |
14:32:45 | Araq | but that's again "omg, let's fix everything at the same time and also: the Nimble package ecosystem must grow and continue to work" |
14:33:13 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=2k2D something like this i assume @Recruit_main707 |
14:33:23 | leorize | it's a bridge that we have to cross |
14:33:33 | leorize | gaining "maintained" packages are better than just packages |
14:34:25 | FromDiscord | <Recruit_main707> i think make both inherit from a Message packet is probably the best way |
14:34:34 | FromDiscord | <Recruit_main707> Message type* |
14:34:34 | zacharycarter | does this make sense? - https://play.nim-lang.org/#ix=2gcc |
14:34:36 | leorize | and nothing drives people away more than "I try to do this thing with macros but it crashes on me instead" |
14:35:23 | leorize | I think it's ok to spend a month just hunting down as many issues as possible |
14:35:27 | leorize | iirc we did this for 1.0 |
14:35:56 | Araq | we need tick-tock releases |
14:36:06 | Araq | like Intel did |
14:36:09 | disruptek | yes. |
14:36:24 | disruptek | i always do it and it's never a problem. |
14:37:19 | leorize | our packages ecosystem is in a much better shape right now |
14:37:49 | disruptek | we don't have to come up with the perfect improvement to the project, just some things to experiment with. |
14:38:45 | Araq | but I do what I do because IMO a "fixed Nim v1" with all the bad parts regarding its threading story for me is an uncompetitive Nim. |
14:39:08 | disruptek | shashlick: would you write a spec for how pm should work in nim? then we can version it and make the compiler and pm work together always. |
14:39:15 | Araq | and if that means I spend less time on compiler crashes, so be it |
14:39:36 | Araq | nice side effect: I also don't get regressions due to compiler "fixes" |
14:39:51 | clyybber | disruptek: Isn't nimph exactly that? |
14:40:12 | disruptek | not as long as the compiler changes. |
14:40:13 | leorize | the threading story is not gonna be perfect anytime soon |
14:40:27 | leorize | what happen to bugs while you're at it? |
14:40:45 | companion_cube | since nim has such a pascal influence, what do you make of Ada tasks? |
14:40:45 | Araq | leorize, they become your job ;-) |
14:41:07 | disruptek | new features really have to justify their existence. |
14:41:23 | companion_cube | (as a main model of threading I mean) |
14:41:25 | leorize | can't you ask status to dedicate a personnel for fixing bugs? :P |
14:41:33 | disruptek | they are increasingly expensive. so much so that some features that were cheap are now both unused and expensive to carry. |
14:41:35 | clyybber | disruptek: Can you specify which compiler changes? Maybe its an easy fix |
14:41:49 | leorize | I work on my own projects and what annoys me more than ever is the need to hunt compiler bugs |
14:42:24 | disruptek | well, as an example, choosenim raised a bug in nimph, the "correct" solution of which was to change the compiler. so devel has this fix but 1.0 does not. |
14:42:26 | companion_cube | I think kruxΓΈ2 has ideas about what features to remove :p |
14:42:51 | zacharycarter | I guess my `SharedRef[T]` works because I'm not leaking anything and I'm not encountering any NPE's. ASAN is also happy |
14:43:12 | zacharycarter | Oh yeah - krux02 was saying last night that he's no longer a member of the Nim org on Github |
14:43:22 | zacharycarter | Not sure if that was a mistake or what |
14:43:22 | clyybber | disruptek: So say you only support 1.2 and above? That doesn't work because you get crashes. So these must be fixed? |
14:43:33 | companion_cube | oh so did he quit? |
14:43:37 | disruptek | this isn't about my projects; i can handle them. |
14:44:01 | zacharycarter | companion_cube: no... I dont think he removed himself |
14:44:13 | Araq | he didn't quit, I removed him. |
14:44:38 | zacharycarter | okay then - not trying to stir anything up just wanted to mention that he had noticed and was trying to tag an issue or something |
14:46:36 | Araq | companion_cube, Ada tasks are most often mapped to threads |
14:47:32 | narimiran | " the other code owners don't get to work 10 hours every day on Nim" -> but there is a certain someone who opens 3 PRs/day, opens 5 issues/day, writes 50 comments/day, etc. maybe we could focus him on more important stuff? ;) |
14:48:11 | narimiran | (to my untrained eye, it looks like he spends 15+ hours/day on Nim :)) |
14:48:30 | clyybber | The threading story is a library only issue IMO. |
14:48:40 | leorize | the entire compiler is owned by Araq :P |
14:48:43 | FromDiscord | <Rika> let's clone ar4a |
14:48:44 | FromDiscord | <Rika> q |
14:48:50 | clyybber | (discarding the fact that spawn is in the compiler :p) |
14:48:59 | FromDiscord | <Rika> damn fingers aint hitting well because my nails are long |
14:49:08 | clyybber | lol |
14:49:16 | Araq | clyybber, it's beginning to be a library issue because of arc/orc |
14:49:23 | clyybber | Yeah |
14:49:54 | FromDiscord | <Recruit_main707> Rika: how did you miss the q for 4 though |
14:50:09 | Araq | zacharycarter, it wasn't a mistake, you cannot shit on me all day long and expect no reaction |
14:50:48 | FromDiscord | <Rika> @Recruit_main707 4 is intentional, i hit a instead of q |
14:53:04 | * | fredrik92 joined #nim |
14:53:32 | * | fredrik92 quit (Client Quit) |
14:53:55 | FromGitter | <Bennyelg> whats is wrong on with this pattern when I use os.walkfiles *_(\\d){8}_(\\d){4}.sql inside specific dir with 1 file (add_column_to_students_20200101_1000) |
14:54:00 | FromGitter | <Bennyelg> (add_column_to_students_20200101_1000.sql) |
14:54:22 | Araq | leorize, fix bugs, get bounties |
14:55:11 | Araq | disruptek, I think the problem for you was mostly our lovely "we must check certificates for SSL" change |
14:55:37 | Yardanico | so about arc - how do I debug its issues? :P for example nimes (nes emulator in nim) runs fine with default GC on devel but not with arc |
14:55:50 | leorize | well where are the bounties? :P |
14:55:50 | leorize | we stopped assigning them 2-3 years ago :P |
14:56:18 | leorize | -d:useMalloc and valgrind :p |
14:56:28 | Yardanico | leorize: well it doesn't leak memory |
14:56:32 | Yardanico | it segfaults at some array access |
14:56:37 | Yardanico | as far as I can see |
14:56:48 | Yardanico | but yeah I'll try |
14:56:49 | clyybber | Hmm. Does valgrind not tell anything? |
14:57:17 | leorize | valgrind is more than just a "memory leak checker" :p |
14:58:46 | Yardanico | well the last valgrind message before the segfault (segfault has a full nim traceback btw) "Invalid read of size 8" ..call stack.. "Address 0x0 is not stack'd, malloc'd or (recently) free'd" |
14:59:06 | clyybber | Ah, nice so its a use after destroy |
14:59:10 | clyybber | Probably |
14:59:35 | Yardanico | nimes is ~2k loc but I'll try to minimize it |
15:00:52 | clyybber | Thanks <3 |
15:02:05 | zacharycarter | Araq: is this similar to what you meant by a `SharedRef[T]`? |
15:02:15 | zacharycarter | https://play.nim-lang.org/#ix=2gcc |
15:02:44 | Araq | that link doesn't work for me |
15:02:53 | zacharycarter | let me try again |
15:03:02 | zacharycarter | https://play.nim-lang.org/#ix=2k2M |
15:03:08 | Yardanico | also nimes uses nim sdl2 wrapper so maybe that's an issue too |
15:04:18 | clyybber | Shouldn't be |
15:04:31 | Yardanico | ok, now it's 1.7k loc |
15:05:37 | zacharycarter | does that link work? |
15:06:16 | Yardanico | zacharycarter: the last one you sent? yes |
15:06:23 | Yardanico | I mean webpage opens :P |
15:08:02 | zacharycarter | cool thanks :) |
15:09:47 | Araq | zacharycarter, hmm looks dangerous |
15:10:35 | * | Hideki_ quit (Remote host closed the connection) |
15:11:47 | * | Hideki_ joined #nim |
15:16:10 | * | Hideki_ quit (Ping timeout: 260 seconds) |
15:17:21 | clyybber | Araq: Do you think its better to always cast so as to preserve the lvalueness or should I only do it when theres a lfPrepareForMutation ? |
15:18:30 | Araq | I don't know |
15:21:49 | clyybber | Hmm, its a bit of a tricky issue. Basically we have to know when generating the conversion wether we want an lvalue or not. |
15:22:20 | clyybber | So I generate the casts so as to preserve lvalueness when possible. |
15:22:29 | Araq | pass it down via another flag in the TLoc, as you outlined |
15:22:38 | clyybber | Ok |
15:22:58 | Araq | (if only the codegen was an AST to AST transformation...) |
15:22:58 | clyybber | Is there a helper proc to check wether a node is an lvalue or rvalue? |
15:23:08 | Araq | plenty |
15:24:05 | Araq | parampatterns.isLValue |
15:26:08 | clyybber | Is that ok to use in cgen? |
15:26:40 | Araq | yeah |
15:29:01 | clyybber | Btw, asking everyone here, whats your opinion on those CI badges? |
15:29:14 | Yardanico | I personally don't think they're so useful |
15:29:17 | narimiran | clyybber: probably the same as yours ;) |
15:29:26 | Yardanico | it's just to boast "look my tests are passing" |
15:29:33 | clyybber | IMO they don't really have a purpose other than detracting potential users because of red CI and being advertisement for the CI s |
15:29:38 | Yardanico | ok it seems to fail on this line "let n = mem.nes" |
15:29:57 | Yardanico | where mem is a ref object, and nes is its only field |
15:30:04 | Yardanico | oh maybe cyclic references |
15:30:09 | Araq | I like them fwiw |
15:30:22 | Yardanico | can arc segfault because of cyclic references or not? |
15:30:22 | Araq | Yardanico, they don't have any influence |
15:30:26 | Yardanico | ah ok |
15:30:29 | Araq | it cannot |
15:30:30 | clyybber | The way the readme currently looks is a bit ugly |
15:30:31 | FromDiscord | <Rika> failing ci tests can be some sort of red flag or so |
15:31:08 | clyybber | Rika: Exactly, and the CI's often fail due to unrelated (non nim) issues |
15:31:15 | narimiran | Araq: are you aware that we now have 7 of those badges? |
15:32:32 | clyybber | This "devel: BIGBADGE 1.0: BIGBADGE" formatting doesn't look too good IMO |
15:32:35 | zacharycarter | Araq: what should I do then? Use `allocShared` and a counter or something? |
15:33:51 | Yardanico | clyybber: so I have to look for some eqdestroy calls for the mem.nes field which is apparently 0 ? |
15:33:57 | Yardanico | i mean it's zeroed somewhere |
15:34:20 | clyybber | Yardanico: Yeah, its probably a double free/destroy |
15:35:09 | clyybber | You don't have to look for them though, only minimize and report it :D |
15:35:34 | leorize | narimiran: we can probably put all of those badges in a table :P |
15:35:39 | leorize | or just get rid of them |
15:35:51 | * | solitudesf quit (Remote host closed the connection) |
15:35:54 | leorize | I never understand the appeal |
15:35:57 | narimiran | i like the latter solution ;) |
15:36:09 | clyybber | Same |
15:36:11 | Yardanico | well there are 5 places where eqdestroy___hNmUe038zNCVJTLCEwmijA(&nes); is called |
15:36:18 | Yardanico | in the C code |
15:36:55 | Yardanico | ah maybe that's on error |
15:37:55 | * | solitudesf joined #nim |
15:40:21 | clyybber | Yardanico: Yeah, thats the bug in the compiler |
15:40:53 | Yardanico | so I set =destroy hook for the CPU object in nimes and it was called twice, although there still was a segfault so it isn't the only place with double free or something |
15:41:07 | Araq | zacharycarter, https://github.com/nim-lang/Nim/pull/10485/files study this |
15:41:08 | disbot | β₯ Draft of smart pointers library for Nim |
15:41:13 | Yardanico | because if I replace =destroy with my own hook which doesn't actually destroy the object it should've worked, so I'll try to add more =destroy hooks |
15:41:50 | zacharycarter | thanks Araq |
15:43:25 | * | Hideki_ joined #nim |
15:44:17 | clyybber | Yardanico: Does nimes use custom =destroys ? |
15:44:21 | Yardanico | no |
15:44:26 | Yardanico | last commit was 1.5 years ago ;) |
15:44:43 | Yardanico | but it still works just fine with default gc on latest devel, only a few deprecation warnings |
15:47:24 | leorize | does it use finalizers? |
15:48:05 | Yardanico | I don't think so |
15:48:35 | Yardanico | also I'm down to 1.5k loc :D removing stuff not related to the bug |
15:48:50 | Yardanico | and yes I still test with default gc to make sure it doesn't segfault |
15:51:43 | * | couven92 quit (Ping timeout: 246 seconds) |
15:56:34 | Yardanico | ok lemme try to manually remove all these 5 destroy calls from the C code and see if it works :P |
16:04:59 | * | Vladar joined #nim |
16:06:20 | * | sunwukong` quit (Quit: Leaving) |
16:08:00 | * | Hideki_ quit (Ping timeout: 256 seconds) |
16:08:15 | * | solitudesf quit (Remote host closed the connection) |
16:09:33 | * | solitudesf joined #nim |
16:17:27 | Yardanico | down to 700 loc :D |
16:21:49 | Yardanico | ok I'm getting there, 300 loc |
16:28:19 | clyybber | \o/ |
16:29:56 | * | couven92 joined #nim |
16:30:06 | Yardanico | clyybber: will it be better for you if I put everything in 1 file or not? |
16:30:41 | clyybber | Would be better probably |
16:30:45 | liblq-dev | does echo still flush stdout? |
16:30:56 | clyybber | Yeah |
16:31:04 | liblq-dev | hm |
16:31:35 | clyybber | Araq: If this is true https://github.com/nim-lang/Nim/blob/devel/compiler/ccgexprs.nim#L2470 it will probably be tyRef right? |
16:35:46 | Yardanico | ok I think I can't minimize anymore, it's 178 lines of code (134 cloc) |
16:36:10 | Yardanico | also it requires a .nes file (although I'm using one of the emulator test ROMs available for download freely) |
16:38:41 | FromDiscord | <Recruit_main707> i see nes emulators are a popular project |
16:38:46 | Yardanico | well kinda |
16:38:50 | Yardanico | because it's all documented and stuff |
16:38:58 | Yardanico | nimes is ~2k cloc |
16:39:01 | Yardanico | full NES emulator |
16:39:05 | FromDiscord | <Recruit_main707> what are those test ROMs? |
16:39:14 | Yardanico | https://wiki.nesdev.com/w/index.php/Emulator_tests |
16:39:15 | * | liblq-dev quit (Ping timeout: 240 seconds) |
16:39:23 | Yardanico | I'm using the first one from branch_timing_tests here |
16:39:32 | FromDiscord | <Recruit_main707> because i _might_ have just grabbed the first ones i found |
16:39:48 | Yardanico | nimes will work for ~85% of all nes roms out there |
16:39:54 | Yardanico | it won't work for roms which use some less known mappers |
16:39:55 | FromDiscord | <Recruit_main707> https://tenor.com/view/pewdiepie-9year-old-army-tgay-congratulations-for-legal-reasons-thats-ajoke-gif-13924557 |
16:40:33 | FromDiscord | <Generic> I'm writing a 3ds emulator in Nim |
16:41:13 | FromDiscord | <Generic> though if it will ever start game (or even homebrew) is still unknown |
16:41:16 | * | liblq-dev joined #nim |
16:41:21 | Yardanico | clyybber: https://file.io/itlqvV7k it's one self-contained file and a NES rom (taken from https://wiki.nesdev.com/w/index.php/Emulator_tests) |
16:41:27 | Yardanico | i removed all sdl2 dependencies, it only depends on stdlib |
16:41:43 | Yardanico | the "correct behaviour" for it is to do an endless loop and print "false", but with --gc:arc it segfaults |
16:42:57 | Yardanico | ah right |
16:43:05 | Yardanico | it works if I remove " result.apu = initAPU(result)" line |
16:43:19 | Yardanico | (it enters an endless loop with --gc:arc just like with default gc which is "correct") |
16:44:44 | Yardanico | oh wait, I don't think it needs a rom at all |
16:47:32 | Yardanico | should I make an issue? it's 69 loc now https://gist.github.com/Yardanico/4f2d95d1e7df51cfb7a1d91ae65326ea |
16:50:51 | leorize[m] | yep, that looks clean |
16:51:09 | Yardanico | poor nimes, i stripped everything I could :D |
16:54:47 | Yardanico | https://github.com/nim-lang/Nim/issues/14159 done |
16:54:49 | disbot | β₯ [ARC] Segfault with cyclic references (?) ; snippet at 12https://play.nim-lang.org/#ix=2k3K |
16:55:21 | dgb | Making a NES emulator in Nim? Nice. |
16:55:28 | Yardanico | dgb: no, it existed for a long time now |
16:55:37 | Yardanico | https://github.com/def-/nimes I was just trying to run it with --gc:arc |
16:56:01 | dgb | Ahh, I see |
17:00:57 | clyybber | Yardanico: Good job on that minification! |
17:01:11 | Yardanico | well I hope I didn't mess something up while reducing it :P |
17:01:19 | Yardanico | the error still seems to be the same as in the start though |
17:01:29 | * | rockcavera quit (Remote host closed the connection) |
17:01:58 | FromDiscord | <Recruit_main707> is it finished yet? |
17:02:04 | Yardanico | what? |
17:02:11 | FromDiscord | <Recruit_main707> nimes |
17:02:15 | Yardanico | nimes? it's finished for years |
17:02:22 | FromDiscord | <Recruit_main707> ah xD |
17:02:36 | FromDiscord | <Recruit_main707> so you are testing arc with it then? |
17:02:38 | Yardanico | read readme in https://github.com/def-/nimes and https://hookrace.net/nimes/ |
17:02:39 | Yardanico | yes |
17:02:45 | Yardanico | actually read https://hookrace.net/blog/porting-nes-go-nim/ |
17:03:15 | leorize[m] | https://doc.rust-lang.org/error-index.html <- this is pretty useful |
17:03:18 | leorize[m] | maybe we can do something similar |
17:03:38 | Yardanico | I think someone talked about a bit similar idea |
17:03:49 | Yardanico | create a tool which will parse nim compiler error messages and give useful output baed on them |
17:04:32 | Yardanico | based* my s key seems to be working badly |
17:06:27 | * | rockcavera joined #nim |
17:08:27 | * | rockcavera quit () |
17:15:27 | clyybber | Araq: https://github.com/nim-lang/Nim/pull/14161 |
17:15:28 | disbot | β₯ Fix #14160 |
17:36:28 | * | exelotl_ is now known as exelotl |
17:39:41 | FromGitter | <Bennyelg> what is wrong ? β let dt = "202001011000" β parse(dt, "yyyyMMddhhmmss") |
17:40:49 | Yardanico | you don't have seconds in this string |
17:40:56 | Yardanico | yyyyMMddhhmm works fine |
17:41:05 | FromGitter | <Bennyelg> oh bah yea thanks didnt notice :| |
17:42:05 | Araq | clyybber, nice and I have a fix for #14079 |
17:42:06 | disbot | https://github.com/nim-lang/Nim/issues/14079 -- 3algorithm.sortedByIt template corrupts tuple input under --gc:arc ; snippet at 12https://play.nim-lang.org/#ix=2k0A |
17:42:50 | * | xcm quit (Remote host closed the connection) |
17:45:32 | * | xcm joined #nim |
17:50:04 | shashlick | so i ran an execCmd() call that returned a value of ret = 256, when I use quit(ret), i get a value of 0 - what's going on? |
17:50:27 | shashlick | this is only on osx |
17:52:17 | leorize | overflow :P |
17:52:42 | leorize | execCmd() does some magic to mask the return code so that it's similar to what a shell would return |
17:52:43 | shashlick | but return value of execCmd() is defined as int, and for quit(), the param is int again |
17:53:01 | leorize | the overflow is not in nim |
17:53:14 | leorize | it's how macos works |
17:53:44 | shashlick | okay so what's my recourse |
17:53:53 | shashlick | if osx and val > 255, mod |
17:54:05 | Araq | only use 0 and 1 as exit codes |
17:54:24 | leorize | shashlick: looks like this is posix fault |
17:54:37 | shashlick | i'm calling nim which errors out with AssertionError and sets errorlevel = 256 |
17:55:27 | leorize | > The value of status may be 0, EXIT_SUCCESS, EXIT_FAILURE, or any other value, though only the least significant 8 bits shall be available to a waiting parent process. |
17:57:33 | * | natrys joined #nim |
17:57:57 | * | rockcavera joined #nim |
18:01:10 | shashlick | okay `quit(ret mod 255)` |
18:04:54 | * | Hideki_ joined #nim |
18:09:49 | * | Hideki_ quit (Ping timeout: 264 seconds) |
18:31:11 | zacharycarter | mratsim: would you be opposed to me working on - https://github.com/mratsim/weave/issues/88 |
18:31:12 | disbot | β₯ Latency-optimized / job priorities / soft real-time parallel scheduling |
18:31:36 | zacharycarter | and also updating the benchmarks to follow pointers for copyMem calls to get things working with `--gc:arc`? |
18:35:12 | zacharycarter | actually - I could use an example for the last thing I mentioned as to where this is an issue and what needs to change |
18:37:38 | FromDiscord | <Recruit_main707> once a thread ends the rest of them seem to die, why? |
18:38:43 | zacharycarter | do you have an example? |
18:39:20 | FromDiscord | <Recruit_main707> https://play.nim-lang.org/#ix=2k4x |
18:39:27 | FromDiscord | <Recruit_main707> i didnt include the actual url |
18:40:54 | FromDiscord | <Recruit_main707> at line 97 the client thread should end, and the bot thread should start working (but it was already active) |
18:43:46 | FromDiscord | <mratsim> @zacharycarter, no problem |
18:45:17 | FromDiscord | <mratsim> Hint: instead of popFirst, do a popLast here: https://github.com/mratsim/weave/search?q=popFirst&unscoped_q=popFirst |
18:46:02 | zacharycarter | ah yeah - I think the popFirst and thread local priority queue stuff is pretty straightforward |
18:46:06 | FromDiscord | <mratsim> and you probably need each worker to have a local priority queue as well: https://github.com/mratsim/weave/blob/master/weave/datatypes/context_thread_local.nim#L47 |
18:46:25 | zacharycarter | I was a bit confused about the memcopy stuff and following pointers - is that an issue with Weave itself or just the bnechmarks? |
18:47:41 | FromDiscord | <mratsim> what's that memcopy stuff? |
18:47:53 | zacharycarter | related to gc:arc |
18:48:13 | zacharycarter | you mentioned in IRC the other day:`Weave used to work with arc for all the benchmarks/test suite, the main unknown is Nim seq/strings` |
18:48:21 | zacharycarter | `well I'm pretty sure they don't work know because I use copyMem without following pointers but, would support be easy enough to add` |
18:49:45 | FromDiscord | <mratsim> arguments are memcpy naively not deep copied |
18:50:24 | FromDiscord | <mratsim> that means that for seq/strings without destructors I would have GC issue |
18:50:52 | FromDiscord | <mratsim> and with destructors I would need to make sure that the argument are "sink" |
18:51:14 | FromDiscord | <mratsim> so that we don't have 2 seq/strings actually "owning" the same memory |
18:51:16 | FromDiscord | <mratsim> https://github.com/nim-lang/Nim/blob/devel/lib/system/channels.nim#L334-L341 |
18:51:37 | FromDiscord | <mratsim> but from the code there ^, with destructors copyMem shoud be good |
18:52:45 | zacharycarter | gotcha |
18:52:49 | zacharycarter | thanks for the explanation |
18:53:16 | Araq | the new string impl is still "pointer free" in the sense no additional indirection was introduced |
18:55:30 | FromDiscord | <mratsim> isn't it still ptr + len + reserved? |
18:57:34 | Araq | it's a (len, ptr) pair and the ptr pointing to cap + data |
18:58:16 | FromDiscord | <mratsim> I see |
19:15:10 | FromGitter | <Knaque> I'm writing yet another Git-related tool, and this time around, it needs to work with Github. What's the "best" solution/workaround to the username and password prompts, in the case of using `osproc.execProcess()` to run the commands? |
19:24:40 | leorize | you can write an interface to that iirc |
19:27:06 | leorize | Knaque: https://git-scm.com/docs/gitcredentials.html |
19:28:51 | FromGitter | <Knaque> That essentially saves the username and password to disk, if I understand correctly? |
19:29:13 | leorize | you can provide a GIT_ASKPASS helper |
19:29:35 | leorize | which might be something that can notify your program to prompt for that |
19:29:39 | disruptek | !repo github |
19:29:42 | disbot | https://github.com/disruptek/github -- 9github: 11github api v3 for nim 15 7β 0π΄ 7& 29 more... |
19:32:19 | FromGitter | <Knaque> @disruptek that is a *lot* of `call` procs |
19:32:59 | leorize | for quick and dirty access to the api, it's the easiest way :P |
19:33:08 | * | natrys quit (Quit: natrys) |
19:35:13 | FromGitter | <Knaque> Access to the API isn't really what I'm looking for, I don't think. I'm taking a look at the `GIT_ASKPASS` thing, but I'm not sure if that's quite right. I should've mentioned this initially, but this is using a GUI instead of a terminal, so that makes things a bit trickier. |
19:35:16 | disruptek | await is a template now? |
19:35:20 | disruptek | that shit merged? |
19:46:49 | * | natrys joined #nim |
19:51:17 | FromGitter | <alehander92> yea? |
19:51:32 | FromGitter | <alehander92> is it breaking something? |
19:52:00 | * | filcuc joined #nim |
19:55:26 | leorize | Knaque: on *nix, create an unix socket, then generate something that will communicate to that socket which will be run by git as GIT_ASKPASS |
19:56:12 | * | Guest29432 is now known as dadada |
19:56:14 | leorize | actually you don't even need a socket, a simple FIFO should work, but if you work with many clients then a socket is recommended |
19:59:54 | FromGitter | <Knaque> Okay, to be entirely honest, I don't really know what most of those things are. I'm sure I have orders of magnitude less experience than you. |
20:00:40 | * | Trustable quit (Remote host closed the connection) |
20:01:44 | * | zacharycarter quit (Remote host closed the connection) |
20:01:44 | * | zacharyc1rter quit (Quit: Lost terminal) |
20:01:44 | FromGitter | <Knaque> Right now, I'm at a position where all I'm currently being prompted for is a password, so what I *think* would work is writing the password to stdin, or something like that... If only I had a clue on how I would do so. |
20:02:07 | FromDiscord | <Rika> sounds insecure |
20:02:15 | FromGitter | <Knaque> Of course, that's just a guess based on my loose understanding of how this stuff works. |
20:02:27 | FromGitter | <Knaque> And yeah, it's definitely going to be insecure. |
20:03:21 | leorize | yes, you can just write it to stdin |
20:03:35 | leorize | process.inputStream will get you the stdin stream |
20:03:38 | leorize | then just write to it |
20:04:10 | leorize | it's not that insecure tbh |
20:04:15 | FromGitter | <Knaque> I'm making this project for 2-3 people who don't really feel like learning proper Git, so security isn't really a priority. I just want something that works. |
20:04:27 | leorize | what os are you targeting? |
20:04:52 | FromGitter | <Knaque> They should be using Windows, but it'd be a nice touch if it worked on *nix as well. |
20:04:53 | * | natrys quit (Quit: natrys) |
20:06:21 | leorize[m] | https://github.com/Microsoft/Git-Credential-Manager-for-Windows/blob/master/Docs/Askpass.md |
20:06:22 | leorize[m] | don't handle the passwords then, let windows do it for you |
20:08:26 | leorize[m] | that thing even supports github 2FA :) |
20:09:10 | * | hax-scramper quit (Remote host closed the connection) |
20:12:57 | FromGitter | <Knaque> I *think* I get how GIT_ASKPASS is supposed to work? Correct me if I'm wrong, but it looks like all I really need to do is have a program just write the username and password to stdout, and askpass should just kind of... take care of it. |
20:14:36 | FromGitter | <Knaque> To reiterate, I really don't understand most of this stuff, so I'm essentially just guessing here. |
20:15:16 | leorize | yep |
20:15:33 | leorize | git call `$GIT_ASKPASS "Username: "` |
20:15:49 | leorize | then it will take whatever echo-ed out as the input |
20:16:30 | FromGitter | <Knaque> Is there a specific format I need to follow? |
20:16:48 | leorize | as written in the manpage, no |
20:17:35 | leorize | > A suitable prompt is provided to the program on the command line, and the userβs input is read from its standard output. |
20:23:23 | * | leorize quit (Ping timeout: 240 seconds) |
20:25:09 | * | leorize joined #nim |
20:25:30 | FromGitter | <Knaque> Well, it looks like it's half working. "Invalid username or password." |
20:25:46 | FromGitter | <Knaque> So, I must've written it wrong. |
20:26:28 | FromGitter | <Knaque> `stdout.write("coolusername\nsupersecretpassword")` |
20:26:59 | FromGitter | <Knaque> Does it need prefixes? i.e. `username: coolusername` |
20:27:18 | FromGitter | <Knaque> Sorry for all the questions, by the way. I'm just genuinely clueless. |
20:27:31 | leorize | you gotta experiment :) |
20:27:36 | leorize | I'm as clueless as you are |
20:27:46 | FromGitter | <Knaque> ah, that's always fun (: |
20:27:52 | FromGitter | <Knaque> Wish me luck. |
20:30:51 | FromGitter | <Knaque> Ah, got it! So, evidently, the format is `password\nusername` |
20:32:12 | * | liblq-dev quit (Quit: WeeChat 2.8) |
20:33:23 | * | narimiran quit (Quit: leaving) |
20:33:51 | * | liblq-dev joined #nim |
20:38:44 | * | Vladar quit (Quit: Leaving) |
20:39:00 | * | filcuc quit (Ping timeout: 244 seconds) |
20:42:25 | * | liblq-devel joined #nim |
20:45:01 | * | liblq-dev quit (Ping timeout: 246 seconds) |
20:49:13 | Araq | bisecting for https://github.com/nim-lang/Nim/issues/14136 would be appreciated |
20:49:15 | disbot | β₯ Semcheck regression when accessing a static parameter in proc ; snippet at 12https://play.nim-lang.org/#ix=2k5M |
20:51:13 | Yardanico | I'll try :P |
20:52:49 | * | casaca quit (Quit: leaving) |
20:55:23 | Yardanico | Araq: I don't know if that's correct, but git bisect says that it's https://github.com/nim-lang/Nim/commit/10eabec6d442cb32c2c74f7c56cc9fff3be40104 |
20:55:43 | Yardanico | Bisecting: 0 revisions left to test after this (roughly 0 steps) [10eabec6d442cb32c2c74f7c56cc9fff3be40104] fix #12864 static params were mutating arg types during sigmatch; fix #12713 ; refs #13529 (#13976) |
20:55:45 | disbot | https://github.com/nim-lang/Nim/pull/13976 -- 6fix #12864 static params were mutating arg types during sigmatch; fix #12713 ; refs #13529 |
20:58:33 | leorize[m] | same result here |
20:58:38 | * | liblq-devel quit (Quit: WeeChat 2.8) |
20:59:22 | leorize[m] | koch temp is awesome :P |
20:59:27 | Yardanico | yep :D |
20:59:44 | leorize[m] | you can just plug that into `git bisect run` then you can just chill out |
20:59:49 | Yardanico | wait wat?! |
20:59:53 | Yardanico | I did it manually lol |
21:00:14 | Yardanico | oh I see |
21:00:15 | Yardanico | very nice |
21:00:36 | leorize[m] | your computer is too fast compared to mine :P |
21:01:00 | * | liblq-dev joined #nim |
21:01:43 | * | leorize quit (Ping timeout: 240 seconds) |
21:02:57 | * | liblq-dev quit (Client Quit) |
21:03:05 | * | liblq-dev joined #nim |
21:06:16 | * | casaca joined #nim |
21:06:50 | * | Jesin quit (Quit: Leaving) |
21:08:11 | * | leorize joined #nim |
21:11:01 | * | leorize quit (Client Quit) |
21:13:20 | * | leorize joined #nim |
21:15:25 | * | casaca quit (Quit: leaving) |
21:16:50 | * | liblq-dev quit (Quit: WeeChat 2.8) |
21:16:53 | * | xcm quit (Ping timeout: 246 seconds) |
21:19:04 | * | Jesin joined #nim |
21:19:16 | * | casaca joined #nim |
21:20:50 | * | xcm joined #nim |
21:34:01 | FromGitter | <Bennyelg> from dateTime to only date ? |
21:34:10 | FromGitter | <Bennyelg> how I truncate the hh:mm:ss |
21:35:13 | Yardanico | https://nim-lang.org/docs/times.html#toTime%2CDateTime |
21:35:24 | Yardanico | but it won't "truncate" them |
21:35:46 | * | lritter quit (Quit: Leaving) |
21:36:05 | shashlick | poor man's cross-platform timeit to measure time taken for a command to run - https://github.com/nimterop/nimterop/blob/master/tests/timeit.nim |
21:36:26 | Yardanico | lol |
21:37:17 | shashlick | here's a timing summary of nimterop tests - https://travis-ci.org/github/nimterop/nimterop/jobs/681167509#L10109 |
21:38:58 | FromGitter | <Samrose-Ahmed> Hi, anyone encounter `undefined reference to `__builtin_ssubll_overflow` error when building nim from source? |
21:39:17 | Yardanico | that happens if your C compiler is too old |
21:39:23 | Yardanico | what's it's version (I assume GCC)? |
21:39:40 | FromGitter | <Samrose-Ahmed> gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) |
21:39:57 | * | exelotl_ joined #nim |
21:41:43 | * | exelotl quit (Ping timeout: 246 seconds) |
21:45:58 | Yardanico | yeah that's a bit too old I think |
21:46:40 | FromGitter | <Samrose-Ahmed> Hm Yea makes sense I'll have to upgrade it. thx |
21:59:03 | FromDiscord | <Recruit_main707> the godot nim example is broken by default :) |
22:02:01 | FromGitter | <zetashift> @Recruit_main707 you mean the stub? I tried it yesterday on 1.2 and it worked for me |
22:06:06 | * | zacharycarter joined #nim |
22:06:46 | * | Hideki_ joined #nim |
22:06:54 | FromDiscord | <Recruit_main707> the dodgethenims |
22:07:08 | FromDiscord | <Recruit_main707> like the game example i mean |
22:07:33 | Yardanico | well what's the error? |
22:08:08 | FromDiscord | <Recruit_main707> E 0:00:31.582 Unhandled Nim exception (NilAccessError): Could not access value because it is nil. |
22:08:08 | * | solitudesf quit (Ping timeout: 265 seconds) |
22:08:48 | FromDiscord | <Recruit_main707> proc onMobTimerTimeout*() {.gdExport.} = self.mobSpawnLocation.offset = rand(high(int32)).float64 |
22:09:01 | FromDiscord | <Recruit_main707> thats the function that causes the error |
22:09:02 | Yardanico | well maybe godot api changed or something |
22:10:45 | * | Hideki_ quit (Ping timeout: 240 seconds) |
22:10:48 | FromGitter | <zetashift> huh |
22:10:57 | FromGitter | <zetashift> that's my code but indeed I never updated that code |
22:11:08 | FromGitter | <zetashift> I think I even mentioned that in the readme haha |
22:11:56 | FromGitter | <zetashift> wait no dodgethenims was updated |
22:13:22 | * | tane quit (Quit: Leaving) |
22:14:01 | FromDiscord | <Recruit_main707> the api has not changed in that at least (PathFollow2D still has `offset=` |
22:14:17 | FromGitter | <zetashift> it might be because a packedscene isn't set in the editor correctly |
22:14:24 | FromGitter | <zetashift> I know that Godot sometimes "forgets" it |
22:15:31 | FromGitter | <zetashift> I'll check for you |
22:15:46 | FromDiscord | <Recruit_main707> thx |
22:16:05 | FromDiscord | <Recruit_main707> ill stay in discord, but i have to go to bed now |
22:16:32 | FromGitter | <zetashift> alright I'll ping or just PM you |
22:23:14 | * | xcm quit (Remote host closed the connection) |
22:24:42 | FromGitter | <iffy> Is there a good non-deprecated replacement for `{.define: mything.}`? When running `nimble test` I want some tests compiled with one flag and other tests compiled with another flag |
22:25:22 | * | NimBot joined #nim |
22:25:25 | * | xcm joined #nim |
22:25:26 | Yardanico | nimbot alive |
22:26:28 | * | Trustable joined #nim |
22:27:32 | FromGitter | <Bennyelg> how can I do someething like β β ```type β StudentModule = object β Students: proc ()``` β β and pass the function with some of the parameters and not all [https://gitter.im/nim-lang/Nim?at=5ea9ff549f0c955d7d9498f6] |
22:29:27 | FromDiscord | <Recruit_main707> Iβm not sure what do you mean, you want to pass your prof certain args, but not all of them? |
22:29:36 | FromGitter | <zetashift> @Recruit_main707 `If you get a NilAccessError on the method onMobTimerTimeout please load the Mob scene in the editor on the Main Node. So select the Main node and in your Inspector you should see 'mob' as one of the script variables, load the Mob scene located in the scenes folder. You might have to restart your editor to see this after compiling the Nim source. And it might be gone after another restart. ` |
22:29:41 | FromGitter | <zetashift> also added this to the README |
22:29:43 | FromGitter | <Bennyelg> yes |
22:30:05 | FromGitter | <Bennyelg> module which will act as a functions container |
22:30:06 | Yardanico | well default values for arguments exisrt |
22:30:09 | FromDiscord | <Recruit_main707> zetashift: thank you very much |
22:30:46 | FromDiscord | <Recruit_main707> What Yaradinco said, you would need to give them default values probably |
22:30:55 | FromDiscord | <Rika> `Yaradinco` is a new one |
22:31:04 | Yardanico | xdd |
22:31:37 | FromDiscord | <Recruit_main707> Iβve been reading it like that for so long π |
22:31:56 | FromDiscord | <Recruit_main707> We will say that itβs because itβs late :p |
22:40:48 | FromGitter | <Bennyelg> we have a fast way to cast object to son ? |
22:40:50 | FromGitter | <Bennyelg> json* |
22:41:06 | Yardanico | if you mean entire objects, no, use %* macro |
22:42:06 | FromGitter | <Bennyelg> %* on the object or on each variable inside the object |
22:42:23 | Yardanico | check docs ;) |
22:42:27 | Yardanico | https://nim-lang.org/docs/json.html#creating-json |
22:42:52 | FromGitter | <Bennyelg> Tried that |
22:42:54 | FromGitter | <Bennyelg> not working |
22:42:58 | Yardanico | wdy, |
22:42:59 | Yardanico | wdym* |
22:43:04 | Yardanico | you need to specify fields manually |
22:43:07 | Yardanico | not just the object itself |
23:11:12 | * | abm quit (Quit: Leaving) |
23:12:17 | * | clyybber quit (Quit: WeeChat 2.8) |
23:15:54 | * | zedeus quit (Ping timeout: 260 seconds) |
23:28:09 | * | zedeus joined #nim |
23:41:07 | FromDiscord | <Gary M> ok so I'm trying to translate some C code to nim where it's reading a file into a `void *code = NULL` |
23:41:21 | Yardanico | well do you really want to translate 1:1? |
23:41:29 | Yardanico | why not use normal nim IO functionality |
23:41:38 | FromDiscord | <Gary M> not really because I don't want to deal with malloc stuff |
23:41:51 | FromDiscord | <Gary M> but the way I'm doing it isn't working with the library I'm interfacing with |
23:41:59 | Yardanico | that line sets code pointer to NULL afaik |
23:42:09 | FromDiscord | <Gary M> yes |
23:42:15 | Yardanico | you need "pointer" it's basically void * |
23:42:30 | FromDiscord | <Gary M> well hold on a sec |
23:42:56 | FromDiscord | <Gary M> I'm passing in a struct with the code size and a pointer to the code itself |
23:43:11 | FromDiscord | <Gary M> so I'm trying to read the code with readFile() |
23:43:33 | FromDiscord | <Gary M> but then for some reason it only wants a pointer of uint32 |
23:44:49 | FromDiscord | <Gary M> ``` |
23:44:49 | FromDiscord | <Gary M> VkShaderModuleCreateInfo* {.bycopy.} = object |
23:44:50 | FromDiscord | <Gary M> sType*: VkStructureType |
23:44:50 | FromDiscord | <Gary M> pNext*: pointer |
23:44:50 | FromDiscord | <Gary M> flags*: VkShaderModuleCreateFlags |
23:44:50 | FromDiscord | <Gary M> codeSize*: csize_t |
23:44:50 | FromDiscord | <Gary M> pCode*: ptr uint32 |
23:44:52 | FromDiscord | <Gary M> ``` |
23:46:31 | FromDiscord | <Gary M> so from the documentation, it says > |
23:46:31 | FromDiscord | <Gary M> |
23:46:32 | FromDiscord | <Gary M> codeSize is the size, in bytes, of the code pointed to by pCode. |
23:46:32 | FromDiscord | <Gary M> |
23:46:32 | FromDiscord | <Gary M> pCode is a pointer to code that is used to create the shader module. The type and format of the code is determined from the content of the memory addressed by pCode. |
23:48:31 | * | krux02_ joined #nim |
23:52:25 | * | krux02 quit (Ping timeout: 264 seconds) |
23:52:46 | * | zedeus quit (Ping timeout: 260 seconds) |
23:54:43 | * | zedeus joined #nim |