00:11:30 | * | awe002 quit (Ping timeout: 260 seconds) |
00:38:33 | FromDiscord | <Recruit_main707> So, once arc/orc become the default “gc”, will the other ones, like the current default one, regions, etc, etc, be eventually deprecated? Or they will stay indefinitely and still be maintained? |
00:41:04 | disruptek | regions is close to deprecation. there won't be much need for the other gcs once arc hits stride. |
00:45:57 | FromDiscord | <Recruit_main707> Hmm, that’s a bit sad, one of the beauties of Nim is the variety of the gcs imo.↵I do understand you might don’t want to spend your time maintaining rather unused gcs.↵(I sis like the concept of how regions works, at least how it should work in theory :p ) |
00:46:21 | disruptek | i do, too. i'm particularly partial to regions. |
00:46:37 | disruptek | like, if there was a gc i /wouldn't/ want to deprecate, it'd be that one. |
00:47:19 | disruptek | i just think the flexibility it affords has /got/ to be useful to someone. |
00:47:28 | disruptek | !repo dust |
00:47:28 | disbot | https://github.com/disruptek/dust -- 9dust: 11Dust: Unattended Syntax Truncation 15 0⭐ 0🍴 7& 1 more... |
00:47:55 | disruptek | dust is at an interesting point; it demonstrates an out-of-compiler compilation pass. |
00:48:17 | disruptek | and virtually nothing else. |
00:48:35 | * | bung joined #nim |
00:52:26 | * | arecacea1 quit (Remote host closed the connection) |
00:52:30 | FromDiscord | <Joe-23> What are the advantages of Nim over Python, as Python can also be used as a compiled language so I am curious to know? |
00:52:55 | * | arecacea1 joined #nim |
00:52:59 | disruptek | they aren't really comparable. |
00:53:02 | FromDiscord | <Recruit_main707> How can python be used as a compiled language? |
00:53:14 | FromDiscord | <Recruit_main707> Do you mean statically typed? |
00:53:43 | FromDiscord | <Joe-23> > How can python be used as a compiled language?↵@Recruit_main707 I think there is CPython that treats it like a compiled language |
00:54:21 | FromDiscord | <Joe-23> > CPython is the reference implementation of the Python programming language. Written in C and Python, CPython is the default and most widely used implementation of the language. CPython can be defined as both an interpreter and a compiler |
00:54:43 | FromDiscord | <Joe-23> Somebody told me it can be used as a compiled language |
00:55:02 | FromDiscord | <Hearthstone> Cython |
00:55:12 | FromDiscord | <Hearthstone> Cython can compile Py files to C or C++ |
00:55:22 | FromDiscord | <Hearthstone> But it's speed is still, really slow compared to Nim |
00:55:35 | disruptek | it makes more sense to compare python to nimscript. |
00:55:46 | FromDiscord | <Hearthstone> Plus half of the libs made in Python don't work when ran through Cython |
00:55:54 | disruptek | nimscript is basically nim syntax but running on the nim vm. |
00:56:04 | FromDiscord | <Recruit_main707> Because cython (probably) transpires the code 1:1, Nim does a lot more than that |
00:57:02 | FromDiscord | <Joe-23> > But it's speed is still, really slow compared to Nim↵@Hearthstone I see interesting. |
00:57:29 | FromDiscord | <Hearthstone> Mhm |
00:57:34 | FromDiscord | <Joe-23> > nimscript is basically nim syntax but running on the nim vm.↵@disruptek[IRC]#0000 I didn't even know Numscript exists |
00:57:40 | FromDiscord | <Recruit_main707> About the advantages, Nim is faster, way faster, it has nice metaprogramming capabilities, and a simple and flexible syntax |
00:57:48 | FromDiscord | <Hearthstone> I've worked with Cython before |
00:57:58 | FromDiscord | <Hearthstone> > About the advantages, Nim is faster, way faster, it has nice metaprogramming capabilities, and a simple and flexible syntax↵Definitely agree with this |
00:58:06 | FromDiscord | <Joe-23> > About the advantages, Nim is faster, way faster, it has nice metaprogramming capabilities, and a simple and flexible syntax↵@Recruit_main707 I am glad I found this language |
00:58:11 | FromDiscord | <Hearthstone> I remember missing classes from Python though, but I'm over that now |
00:58:42 | FromDiscord | <Recruit_main707> We all had to get over them ;) |
01:01:11 | FromDiscord | <Hearthstone> Mhm :) |
01:01:40 | FromDiscord | <Hearthstone> Nim doesn't need classes, especially since it has types, plus it's cool way of passing the first argument |
01:04:12 | * | krux02_ quit (Remote host closed the connection) |
01:14:20 | FromDiscord | <Rika> i never fucking missed classes in python |
01:14:52 | FromDiscord | <Rika> even if python was my first language i dont know why i never missed classes at all |
01:15:18 | disruptek | maybe because it's not classes that add value. |
01:15:57 | FromDiscord | <Rika> wdym? |
01:16:06 | FromDiscord | <Elegant Beef> It's those member functions, which a UFCS lets you get them everywhere! |
01:16:19 | disruptek | no one picks up python because they want classes. |
01:16:22 | FromDiscord | <Rika> if so many people from other languages missed classes at some point in their nim journey, why did i never miss them? |
01:16:31 | FromDiscord | <Elegant Beef> I didnt miss them from C# |
01:16:38 | FromDiscord | <Elegant Beef> Which is inheritly class based |
01:16:39 | disruptek | maybe because it's not classes that add value. |
01:16:57 | FromDiscord | <Rika> dont get it |
01:17:04 | FromDiscord | <Elegant Beef> Classes just give you member functions, which you dont really need since we have the UFCS, it's no benefit to have classes |
01:17:05 | disruptek | other people might just be stupid. |
01:17:05 | FromDiscord | <Rika> w/e ive been awake for 24 hours at this point |
01:18:28 | FromDiscord | <Joe-23> One thing, can this language be compiled for Android and iOS? |
01:18:34 | disruptek | sure. |
01:19:09 | disruptek | you can generate objective-c and pull it right into your xcode projects, too. |
01:19:22 | FromDiscord | <Rika> yes for both but theyre both immature compared to other backends |
01:20:47 | FromDiscord | <Joe-23> > you can generate objective-c and pull it right into your xcode projects, too.↵@disruptek[IRC]#0000 Oh nice |
01:21:00 | FromDiscord | <Joe-23> > yes for both but theyre both immature compared to other backends↵@Rika Is this something that is being worked on constantly? |
01:21:20 | FromDiscord | <Rika> not as much as the other backends but sure |
01:21:33 | FromDiscord | <Rika> more on android side less on ios afaik |
01:21:39 | FromDiscord | <Rika> comparing to each other |
01:22:05 | FromDiscord | <Joe-23> > more on android side less on ios afaik↵@Rika Yeah for me Android is more important than iOS due to its complete closed source eco system |
01:25:02 | FromDiscord | <Joe-23> sent a code paste, see https://play.nim-lang.org/#ix=2unJ |
01:25:30 | disruptek | yes. |
01:25:36 | disruptek | ~manual |
01:25:37 | disbot | manual: 11the Nim Manual is https://nim-lang.org/docs/manual.html -- disruptek |
01:28:55 | FromDiscord | <Joe-23> Thanks |
01:29:14 | FromDiscord | <Joe-23> sent a code paste, see https://play.nim-lang.org/#ix=2unK |
01:29:18 | FromDiscord | <Joe-23> I have no idea this means? |
01:29:54 | disruptek | i think on windows nim comes with a compiler that works. |
01:30:03 | disruptek | if you want to use the one that it found, instead, you can. |
01:30:46 | FromDiscord | <Joe-23> I see thanks |
01:31:02 | disruptek | i'm guessing. i don't use windows. |
01:52:51 | * | apahl quit (Ping timeout: 272 seconds) |
01:54:10 | * | apahl joined #nim |
01:57:51 | * | leorize quit (Quit: WeeChat 2.8) |
02:07:41 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
02:12:52 | shashlick | Just add your compiler to the path and be fine |
02:14:36 | * | endragor joined #nim |
02:18:23 | * | thomasross joined #nim |
02:33:52 | * | muffindrake quit (Ping timeout: 260 seconds) |
02:36:03 | * | muffindrake joined #nim |
02:56:19 | * | unihernandez22 joined #nim |
03:04:53 | FromDiscord | <Joe-23> > i'm guessing. i don't use windows.↵@disruptek[IRC]#0000 Minggw doesn't come with Windows I installed this myself |
03:04:58 | FromDiscord | <Joe-23> but yeah I did all yeses |
03:08:42 | FromDiscord | <Joe-23> hmm `nim` didn't seem to install |
03:08:46 | FromDiscord | <Joe-23> after doing all yeses |
03:08:49 | FromDiscord | <Joe-23> it just closed |
03:09:00 | FromDiscord | <Joe-23> and when I type nim on the console it doesn't recognise it |
03:09:07 | FromDiscord | <Joe-23> (edit) 'nim' => '`nim`' |
03:10:06 | FromDiscord | <Joe-23> I am launching the installer again and it is detecting the nim is in my path |
03:16:04 | FromDiscord | <Hearthstone> @Joe-23 restart the PC |
03:21:06 | shashlick | Windows isn't very predictable with paths |
03:25:19 | FromDiscord | <Hearthstone> Linux is way better :3 |
03:25:25 | * | unihernandez22 quit (Ping timeout: 264 seconds) |
03:25:51 | FromDiscord | <Joe-23> > @Joe-23 restart the PC↵@Hearthstone I will give that a shot |
03:26:01 | FromDiscord | <Hearthstone> Okay! |
03:26:10 | FromDiscord | <Joe-23> > Linux is way better :3↵@Hearthstone Yeah true |
03:26:15 | FromDiscord | <Hearthstone> I just remember having to do this because of Window's weirdness |
03:26:20 | FromDiscord | <Hearthstone> :) |
03:26:22 | * | unihernandez22 joined #nim |
03:29:59 | FromDiscord | <Joe-23> 😆 |
03:33:49 | * | unihernandez22 quit (Ping timeout: 264 seconds) |
03:33:55 | * | leorize joined #nim |
03:35:20 | FromDiscord | <Hearthstone> Aah, reminds me of when I first tried linux |
03:36:30 | leorize | looks like Nim popped to HN front page again :P |
03:37:34 | leorize | anyone here wrote elixir? |
03:38:52 | leorize | I read that elixir/erlang promotes writing systems that are separated into processes for fault tolerance |
03:39:25 | leorize | which is a pretty valid strat, but no one really do it in mainstream langs because it's just complex |
03:39:49 | leorize | wonder what's in erlang/elixir that makes it easier and whether I can build a nim lib that do the same thing :P |
03:40:27 | kungtotte | The entire Erlang platform is built around that concept, so most of it is handled for you behind the scenes |
03:42:49 | leorize | what I'm interested would be how the syntax and the flow works |
03:43:43 | leorize | secure and reliable systems can be built pretty well by splitting a big program into supervised processes (it also let you do privsep) |
04:06:01 | * | supakeen quit (Quit: WeeChat 2.8) |
04:06:37 | * | supakeen joined #nim |
04:10:37 | Zevv | disruptek: hmm interesting approach, was dust born for the benefit of cps/csp? |
04:24:35 | FromDiscord | <Joe-23> > I just remember having to do this because of Window's weirdness↵@Hearthstone It works now, thanks, sometimes it doesn't require restart with other compilers which is strange |
04:28:22 | * | thomasross quit (Ping timeout: 246 seconds) |
04:36:44 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
04:36:51 | * | njoseph joined #nim |
04:36:51 | * | njoseph quit (Client Quit) |
04:36:57 | * | njoseph joined #nim |
04:36:57 | * | njoseph quit (Client Quit) |
04:37:03 | * | njoseph joined #nim |
04:37:03 | * | njoseph quit (Client Quit) |
04:37:09 | * | njoseph joined #nim |
05:31:08 | * | solitudesf joined #nim |
05:42:29 | * | leorize quit (Remote host closed the connection) |
05:49:32 | * | Vladar joined #nim |
05:50:34 | * | leorize joined #nim |
05:53:57 | * | apahl quit (Ping timeout: 260 seconds) |
05:54:28 | * | apahl joined #nim |
06:12:13 | * | leorize quit (Quit: WeeChat 2.8) |
06:19:44 | Araq | all you need to do is to restart your console/terminal after a PATH change |
06:21:14 | Zevv | look who's back |
06:24:41 | * | PMunch joined #nim |
06:26:41 | Zevv | so you got your two weeks fully packed with adrenaline-induced nothingness? |
06:32:20 | Araq | yeah. I managed to hardly program at all |
06:32:40 | PMunch | Oh, welcome back :) |
06:33:08 | FromDiscord | <Yardanico> I managed to hardly program in these two weeks as well :D |
06:33:51 | Zevv | good work |
06:40:32 | FromDiscord | <krisppurg> is there a nim benchmark comparison between go rust etc? |
06:41:21 | FromDiscord | <Elegant Beef> https://github.com/kostya/benchmarks↵https://github.com/frol/completely-unscientific-benchmarks |
06:41:22 | PMunch | There are plenty |
06:42:05 | PMunch | Hmm, it would be nice if the bot would replace newlines with a space instead of the ↵ character.. |
06:42:28 | PMunch | ref: https://irclogs.nim-lang.org/17-08-2020.html#06:41:21 |
06:42:49 | FromDiscord | <Elegant Beef> Ah, my bad 😄 |
06:43:33 | FromDiscord | <krisppurg> Oh? |
06:44:10 | Araq | don't look at "completely unscientific benchmarks" |
06:45:37 | Araq | look at scientific benchmarks or simply use Nim because it's as fast as Rust in theory and practice is catching up to theory |
06:46:11 | FromDiscord | <Elegant Beef> I mean it says just that |
06:46:29 | FromDiscord | <Elegant Beef> > Nim, D, and Rust can go as fast as C/C++ can when you switch to "unsafe" manual memory management. |
06:46:52 | FromDiscord | <Elegant Beef> But this doesnt use ARC, so the test is probably outdated |
06:48:03 | FromDiscord | <Elegant Beef> Atleast in my view Nim on there is put relatively high based off all statistics |
06:49:04 | FromDiscord | <Elegant Beef> But yea the fact is it's a fast language with more readable syntax, so just use it 😄 |
06:49:16 | PMunch | Yeah, Nim tends to be in the upper echelon in all these suites |
06:50:53 | FromDiscord | <Elegant Beef> The Json test though it's pretty slow, but eh who needs all that json speed 😄 |
06:54:41 | PMunch | Yeah that one surprised me a bit |
06:55:15 | FromDiscord | <Elegant Beef> I mean packedjson gets it up a bit, but still relatively slow |
06:56:06 | Yardanico | packedjson with ARC is faster |
06:56:40 | FromDiscord | <Elegant Beef> Is it sub 1s? |
06:57:02 | PMunch | I tried to run ARC on the unscientific "fast" implementation, it segfaulted :P |
06:57:38 | FromDiscord | <Elegant Beef> Got that ARC speed, less time in the application than the alternative implementations |
07:08:25 | Araq | json's performance got a regression when we made it work for compile-time |
07:08:58 | PMunch | Haven't it worked on compile-time for ages? |
07:09:01 | Araq | but I haven't been able to fix it and its variance is high on my machines, not easy to optimize |
07:09:06 | PMunch | Hasn't |
07:09:37 | PMunch | Or were you talking specifically about packedjson? |
07:09:48 | Araq | no, json's parser which is used by packedjson too |
07:10:01 | Araq | and the regression happened before v1 iirc |
07:15:27 | FromDiscord | <Varriount> Araq! You're back! |
07:16:40 | PMunch | Hmm, I have a problem with the dlls.zip file. I have a Makefile that downloads it and unzips it. This runs within a docker container. But after creating the output directory and downloading the file I get a permission denied on unpacking the file.. |
07:20:09 | PMunch | Oh damn it.. I simply didn't have `unzip` installed.. Why is that a permission denied error, ffs |
07:20:23 | FromDiscord | <Elegant Beef> i just learned that `a := <- b` is acceptable go syntax, why do languages hurt me |
07:21:07 | FromDiscord | <Elegant Beef> is `a.send(b)` too cool or something? |
07:22:56 | Araq | I think it's a 'receive' operation, not a send. |
07:23:07 | FromDiscord | <Varriount> @Elegant Beef Take a value out of channel b and assign it to a? |
07:23:26 | FromDiscord | <Elegant Beef> https://tour.golang.org/concurrency/2 It's used in go's channels |
07:23:42 | FromDiscord | <Elegant Beef> a is a channel in that case |
07:23:50 | Araq | yeah I know Go. |
07:24:09 | FromDiscord | <Varriount> No, b is the channel |
07:24:16 | FromDiscord | <Elegant Beef> Yea sorry operator is used twice |
07:24:28 | FromDiscord | <Elegant Beef> without `:=` it's send |
07:25:29 | Araq | no, it's "unary <- is receive, binary <- is send, := has nothing to do with it" |
07:25:55 | FromDiscord | <Elegant Beef> I meant in the example on the page |
07:26:50 | PMunch | Yeah, but `a := <- b` is assign a to the result of unary <- applied on b while `a <- b` is binary <- between a and b, no? |
07:35:00 | FromDiscord | <Elegant Beef> We'll say yes just to add words below |
07:42:06 | * | krux02 joined #nim |
07:46:48 | PMunch | Hi krux02 :) Been thinking about the negative stack thing a bit more. I was wondering if it would be more intuitive if a command gets put on the stack as half-applied function instead of going into some hidden list |
07:47:05 | PMunch | I already have commands in stacklang, so it would mesh nice with that |
07:47:27 | krux02 | you mean like haskell? |
07:48:17 | PMunch | `5 +` would result in a stack with `+(5)` on it, then you could run something like `10 swap call` which would add 10 to the stack, swap the order, and then call the topmost item (now the +(5) command) |
07:48:29 | PMunch | Kind of, yeah |
07:50:58 | PMunch | So you'd have to do the `swap call` dance which isn't all that nice. But it allows you to use the normal syntax and such to modify these commands (e.g. pop it if you don't want it any more) |
08:14:25 | Zevv | just make a forth and be happy |
08:14:28 | Zevv | nothing to be ashamed off |
08:15:43 | PMunch | Well that's no fun |
08:18:03 | Zevv | we've all been there |
08:19:05 | Zevv | https://github.com/zevv/zForth and I'm not even sorry |
08:22:07 | PMunch | I had already tried Forth before I decided to make stacklang |
08:22:22 | PMunch | It's simply isn't what I was looking for |
08:22:23 | FromDiscord | <Elegant Beef> Yall nerds are weird, just use a calculator |
08:22:32 | PMunch | It is a calculator :P |
08:22:46 | PMunch | A programmable one at that |
08:23:12 | PMunch | Basically stacklang tries to be closer to a regular calculator than your average Forth |
08:23:27 | PMunch | (and by regular calculator I mean RPN calculator) |
08:32:16 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
08:37:36 | Zevv | you need at least 2 stacks, but 3 is better |
08:44:39 | PMunch | In stacklang you can create as many as you'd like :) |
08:44:56 | PMunch | It doesn't even have variables, just named stacks |
08:47:29 | FromDiscord | <Elegant Beef> Pmunch do you have speed stack cups, cause i think you have a thing for stacking |
08:56:58 | PMunch | Haha, no I've never tried that :P |
09:10:04 | * | fowl_ quit (Read error: Connection reset by peer) |
09:10:45 | * | fowl quit (Read error: Connection reset by peer) |
09:10:57 | * | sirn quit (Read error: Connection reset by peer) |
09:11:06 | * | kwilczynski quit (Read error: Connection reset by peer) |
09:14:12 | * | kwilczynski joined #nim |
09:14:45 | * | kwilczynski quit (Max SendQ exceeded) |
09:15:15 | * | fowl_ joined #nim |
09:15:56 | * | fowl joined #nim |
09:16:28 | * | sirn joined #nim |
09:19:44 | * | kwilczynski joined #nim |
09:22:27 | Araq | https://gizmodo.com/boeing-747s-still-use-floppy-disks-to-get-critical-soft-1844683811 |
09:22:32 | Araq | nice |
09:31:05 | Zevv | if it aint broken, right |
09:32:05 | * | abm joined #nim |
09:33:19 | Araq | my floppies were constantly broken, but it's much better than an IoT always online device |
09:43:29 | * | tribly quit (Remote host closed the connection) |
09:43:54 | * | tribly joined #nim |
09:47:18 | Zevv | I have this one 1.44" disk that I have been using for my oscilloscope for over 15 years and it still goes and goes |
09:47:21 | Zevv | its amazing |
09:47:29 | * | awe002 joined #nim |
09:48:18 | Zevv | one day my usb drive will fail, and then what |
09:57:56 | FromDiscord | <gokr> Idiotic question: Are casts purely compile time? Do they incur a runtime cost? |
09:59:22 | FromDiscord | <gokr> Sidenote: Our game written in Nim using ORX now builds and runs in Android 🙂 |
10:01:43 | * | FromGitter quit (Ping timeout: 244 seconds) |
10:01:50 | FromDiscord | <Recruit_main707> nice! congrats |
10:02:19 | FromDiscord | <Recruit_main707> casts are runtime i think |
10:02:42 | FromDiscord | <Recruit_main707> but i think they dont have any overhead too (not sure) |
10:03:02 | * | oprypin quit (Ping timeout: 260 seconds) |
10:03:23 | FromDiscord | <lqdev> casts are just changing the type without changing the bit pattern |
10:03:30 | FromDiscord | <lqdev> so they do involve some codegen |
10:03:36 | FromDiscord | <lqdev> but the C compiler *should* optimize them out |
10:04:00 | FromDiscord | <gokr> Right, that was what I kinda guessed. |
10:07:31 | FromDiscord | <Recruit_main707> whats the game name btw? |
10:07:37 | FromDiscord | <Recruit_main707> i want to check it out |
10:16:15 | * | oprypin joined #nim |
10:18:12 | Zevv | clyybber: we dont have a nim issue for the typed macro proc idents/syms http://ix.io/2uht/nim yet, do we? |
10:19:00 | * | FromGitter joined #nim |
10:25:29 | FromDiscord | <Yardanico> You didn't ping him :) @Yardanico |
10:25:41 | FromDiscord | <Yardanico> Ah wait |
10:25:45 | FromDiscord | <Yardanico> He left discord right |
10:25:47 | FromDiscord | <Yardanico> I forgot |
10:25:52 | FromDiscord | <Yardanico> I need to leave it now too |
10:30:13 | PMunch | @Yardanico, did you intend to ping yourself there? |
10:30:21 | PMunch | Or is that a bug in the bridge? |
10:31:22 | FromDiscord | <lqdev> he pinged himself on discord, there was no bridge involved :P |
10:32:20 | Zevv | maybe he very much identifies with @clyybber |
10:32:28 | PMunch | Okay :) Just wasn't sure if that was intentional or if the ping -> name conversion logic was borked |
10:32:32 | Zevv | but i didnt ping him on purpose, pinging is nasty |
10:33:26 | Zevv | in this age of whatsapp, twitter and other demanding "social" media, let us honour the async nature of the IRC medium, and the peace it brings to its users |
10:33:55 | Zevv | you hear me @clyybber? let us! |
10:39:49 | * | Vladar quit (Remote host closed the connection) |
10:40:15 | Araq | yay, "Address Sanitizer in Visual C++" |
10:41:59 | * | arecacea1 quit (Remote host closed the connection) |
10:42:00 | * | Vladar joined #nim |
10:42:18 | * | arecacea1 joined #nim |
10:43:20 | FromDiscord | <djazz> can threads be enabled by code/pragma or is the compiler switch required? |
10:44:05 | PMunch | I think the switch is required |
10:44:14 | PMunch | But it can of course be put in nim.cfg |
10:54:45 | * | Trustable joined #nim |
11:00:13 | FromDiscord | <lqdev> anyone knows an algorithm for decoding raw yuv420p data? |
11:02:41 | PMunch | Hmm federico3, is the directory down? |
11:03:38 | federico3 | works for me |
11:03:56 | PMunch | Oh, now it works |
11:04:00 | PMunch | Got a 503 just a second ago |
11:14:29 | Zevv | lqdev: "decoding"? |
11:14:50 | Zevv | you mean color convert to interleaved RGB, for example? |
11:15:56 | Zevv | its not hard to do, but it is hard to do it fast |
11:16:21 | Zevv | either go for a simple loop with pointers to your y,u,v planes and do the math to convert each pixel to r,g,b |
11:16:26 | Zevv | or use libswscale |
11:16:59 | Zevv | *real* men write a shader and do it on the gpu of course |
11:37:28 | FromDiscord | <Clyybber> sup |
11:39:19 | FromDiscord | <Clyybber> Araq: hi! https://github.com/nim-lang/Nim/pull/15158 ignoring the hacky scope restoring; do you think instead of using resetSemFlag we should just introduce efForceResem? |
11:39:20 | disbot | ➥ Fix #5691 |
11:40:23 | FromDiscord | <lqdev> Zevv: i don't need interleaved RGB, i need to compare some pixels |
11:40:30 | FromDiscord | <lqdev> so the color format doesn't matter too much |
11:41:06 | FromDiscord | <lqdev> what i'm actually trying to do is delete frames that don't have a certain colored pixel |
11:43:23 | * | synshroud joined #nim |
12:04:31 | PMunch | Is there a terminal table library in Nim? |
12:04:53 | PMunch | Add rows with columns and then say print and have it print the entire thing? |
12:06:01 | * | supakeen quit (Quit: WeeChat 2.8) |
12:06:40 | * | supakeen joined #nim |
12:06:59 | leorize[m] | !repo termtables |
12:07:01 | disbot | https://github.com/case/termtables -- 9termtables: 11Go ASCII Table Generator, ported from the Ruby terminal-tables library 15 1⭐ 17🍴 7& 10 more... |
12:07:15 | FromDiscord | <flywind> !repo nim-terminaltables |
12:07:16 | disbot | https://github.com/xmonader/nim-terminaltables -- 9nim-terminaltables: 11terminal tables for nim 15 31⭐ 2🍴 |
12:07:19 | Oddmonger | it seems not possible to have something like this in a case / of: |
12:07:23 | Oddmonger | case foo: |
12:07:31 | Oddmonger | var used_in_every_of = … |
12:07:36 | Oddmonger | of bar: |
12:07:38 | Oddmonger | … |
12:07:42 | PMunch | Yeat I've seen that, but I don't want the boxes and stuff.. |
12:08:01 | Oddmonger | cannot have shared var defined inside the case is entered |
12:08:08 | PMunch | Uhm, no, that is not possible Oddmonger |
12:08:23 | PMunch | You can wrap the case in a block |
12:08:49 | Oddmonger | wrap in a block ? |
12:10:21 | PMunch | https://play.nim-lang.org/#ix=2uqc |
12:10:24 | PMunch | Like so ^ |
12:11:16 | Araq | Clyybber: if possible, remove the nfSem flag instead entirely |
12:11:45 | Araq | there is no good reason for it. there are however, aliasing problems where we forget copyNode/Tree |
12:12:51 | Oddmonger | thank you PMunch |
12:14:06 | PMunch | Oddmonger, no problem |
12:14:22 | Oddmonger | i note the world exists only in a very small range, and the darkness swallows the rest… Howard Philips Nimcraft |
12:14:24 | PMunch | There is no guarantee that you actually use it in all the branches by the way |
12:15:21 | PMunch | Huh, just realised I've never really known Lovecrafts first name until now |
12:15:22 | Oddmonger | i could also defines the var outside of the case/of , it would have very very little overhead |
12:15:29 | PMunch | I've just known him as HP Lovecraft |
12:16:26 | PMunch | Yeah the block thing is only really useful for scoping |
12:16:40 | PMunch | Well, and it's actual usage which is to be able to "break" out of them |
12:17:04 | PMunch | You can also name them like "block outer: block inner: break outer" |
12:17:50 | PMunch | Even though your quote was more fitting I was actually referencing "Hello darkness my old friend" there :P |
12:18:36 | PMunch | Oh wait, that wasn't an actual quote :P |
12:27:43 | Oddmonger | btw i just check and it's Phillips, not «Philips» :) |
12:28:12 | * | waleee-cl joined #nim |
12:31:39 | FromDiscord | <Joe-23> sent a code paste, see https://play.nim-lang.org/#ix=2uqm |
12:32:10 | FromDiscord | <Joe-23> I know that `echo` prints `/n` automatically, is there a way to disable `/n` or use another comand that does not print out this extra `/n` character? |
12:33:23 | PMunch | stdout.write |
12:33:42 | FromDiscord | <Joe-23> Thanks |
12:34:00 | PMunch | No problem |
12:44:38 | FromDiscord | <gokr> @Recruit_main707 Well, it's not out yet - and it's not going to be open source, but... you can see a tiny bit of early gameplay at <https://www.youtube.com/watch?v=eU7VKn8dZPM> |
12:45:54 | FromDiscord | <gokr> (although that's a truly crappy movie - I had a hard time driving tanks all on my own via keyboard) |
12:59:03 | * | Kaivo joined #nim |
13:13:54 | Araq | I like it :-) |
13:15:04 | FromDiscord | <Joe-23> One question I am a bit confused between `readLine(stdin)` and `stdin.readLine`.↵↵So like with `readLine(stdin)` how does `stdin` tell `readLine` to read from the user input? |
13:16:07 | solitudesf | https://nim-lang.github.io/Nim/manual.html#procedures-method-call-syntax |
13:16:19 | Zevv | there is not telling, its just a different way to do the same thing |
13:16:59 | Zevv | it's syntactic sugar. if you do a.b(), nim will - with some additional rules - transform this to b(a) |
13:17:08 | PMunch | This applies to everything |
13:17:13 | PMunch | So 5.echo works as well |
13:17:36 | Zevv | and which you use is mostly a matter of personal taste |
13:18:02 | Zevv | i seem to have no preferred style, i just mix them both without any proper philosophy |
13:18:11 | PMunch | Haha :P |
13:19:00 | Zevv | usually as soon as the brackets come in, i move to traditional style |
13:20:16 | * | vqrs joined #nim |
13:23:34 | * | lritter joined #nim |
13:24:35 | FromDiscord | <InventorMatt> Zevv: i tried using your nim-arduino library and after following your instructions i get: exit status 1 Error compiling for board Arduino Uno. when i try and compile |
13:24:58 | FromDiscord | <InventorMatt> do you have any ideas what could cause that? |
13:35:45 | Zevv | oh dude i haven't ran that myself since I initially made that |
13:36:47 | Zevv | and to be honest, it's a bit of a hack |
13:37:17 | Zevv | I contacted the arduino people to see if they would be interested to help out with a proper integration, but apparently they were not |
13:38:03 | FromDiscord | <InventorMatt> that's what i figured. I would love to help improve it but i wouldn't even know where to start. I have only a rudimentary grasp of cpp or even c for that matter |
13:38:07 | FromDiscord | <Clyybber> Araq: pong |
13:38:18 | FromDiscord | <Clyybber> \> if possible, remove the nfSem flag instead entirely↵Yeah, I think thats best |
13:38:24 | FromDiscord | <Clyybber> if possible |
13:40:06 | Zevv | ~inventormatt: I'd start with seeing if you can get some more verbose logging: what is being ran, and why does it fail? |
13:40:07 | disbot | no footnotes for `inventormatt:`. 🙁 |
13:40:50 | Zevv | my hack consists of a thing that *looks* like a c compiler, but actually invokes the nim compiler |
13:41:03 | * | sentreen quit (Ping timeout: 265 seconds) |
13:42:40 | FromDiscord | <InventorMatt> i'll see if i can get it to do that then. I know have a nim and the nim_arduino in my path so it must be something the ide is doing |
13:43:30 | Zevv | good start. if you need some more help ping me later, i'm on mobile now so hard to look into this |
13:43:55 | FromDiscord | <InventorMatt> thanks. will do |
13:44:16 | PMunch | Basically the Arduino IDE calls the hack compiler as a C compiler and then the hack compiler translates that into a call to the Nim compiler to build the code into whatever the Arduino IDE excepts to get out |
13:44:54 | PMunch | The Arduino IDE has a mode that gives way more verbose output, can't quite remember what the setting is called, but if you enable that you should be able to see a lot more information |
13:45:15 | Zevv | ah and of course you have pmunch, he's our arduino expert |
13:45:23 | Zevv | he actually *uses* that stuff |
13:45:25 | * | PMunch blushes |
13:46:05 | Zevv | well, I have this problem you know. I advertise myself as a professional embedded software developer. So of course that means I can not be seen in public ever carrying an arduino or a raspberry or stuff like that |
13:46:22 | Zevv | because, you know, I'm a *professional* |
13:46:57 | PMunch | Haha :P |
13:48:51 | Oddmonger | how do you call this ? « echo "{foo}" » (the {foo} part) |
13:49:05 | Oddmonger | it's for searching syntax in the manual :þ |
13:49:13 | FromDiscord | <InventorMatt> found the more verbose output zevv, pmunch https://pastebin.com/k9akTh9N |
13:49:30 | Oddmonger | for defining rounded numbers printing |
13:50:08 | Oddmonger | ah , strformat |
13:50:23 | Zevv | I guess arduino studio added some stuff which the hack compiler does not like |
13:51:25 | FromDiscord | <InventorMatt> maybe i should try for an older arduino version then |
13:52:14 | Zevv | gimme a minute, Ill try to find a computer somewhere |
13:54:12 | alehander92 | zevv i couldnt find job |
13:54:15 | alehander92 | as embedded |
13:54:43 | alehander92 | i think i didn't do well on the bits-combination! stuff |
13:55:02 | alehander92 | it seemed so simple and so unreachable |
13:55:14 | Zevv | alehander92: its a bit of a niche I guess. |
13:55:22 | Zevv | I was just lucky I started that stuff as an 10yo |
13:55:52 | alehander92 | cool |
13:56:11 | Zevv | I'm not even an expert, but I've seen a lot of layers of shit. I think I should be able to explain from the transistor level up what happens when you type 'A' in your xterm over an ssh session to another machine |
13:56:15 | PMunch | Yeah that -DARDUINO_LIB_DISCOVERY_PHASE seems to not have been parsed correctly.. |
13:56:26 | Zevv | PMunch: npeg troubles right |
13:56:37 | PMunch | Hmm, might be |
13:56:43 | Zevv | such a mess |
13:56:44 | Zevv | that |
13:56:47 | PMunch | Or it might've been added to the command a touch late |
13:56:53 | PMunch | Anyways, I'm off |
13:56:55 | alehander92 | <3 |
13:56:58 | Zevv | bye |
13:57:00 | PMunch | Time to go home and collapse :S |
13:57:05 | alehander92 | yeah that's a cool thing |
13:57:19 | * | PMunch quit (Quit: Leaving) |
13:57:19 | alehander92 | i still have to fill some gaps in my knowledge |
13:57:28 | alehander92 | buy pmunch |
13:57:30 | alehander92 | bye* |
13:59:20 | * | arecacea1 quit (Remote host closed the connection) |
14:01:22 | Zevv | InvetorMatt: interestingly enough I do not see that -DARDUINO_LIB_DISCOVERY in my logs |
14:01:48 | Zevv | what is your arduino studio version? |
14:02:47 | FromDiscord | <InventorMatt> i am using 1.8.13 |
14:02:53 | * | arecacea1 joined #nim |
14:03:14 | Zevv | oh right I just downloaded 1.8.12 :) |
14:03:41 | FromDiscord | <Slyris> hey, i forked official nimble package list from nim lang repo, when i use `nimble refresh` i always get ↵↵Error: Refresh failed↵... Downloaded packages.json file is invalid |
14:03:44 | FromDiscord | <Slyris> Is it intented ? |
14:05:01 | Zevv | yea, can reproduce now |
14:05:03 | Zevv | lemmesee |
14:06:55 | FromDiscord | <Slyris> How to install a package from a new json package list ? |
14:06:59 | FromDiscord | <Slyris> Using nimble install |
14:07:07 | FromDiscord | <Slyris> It's seems to always pick from official package list |
14:15:45 | Zevv | yeah the fun, arduino studio just appends stuff after the cmdline I generate in the platform.local.txt |
14:15:51 | Zevv | so it kind of violates its own protocol with that |
14:17:10 | * | drewr quit (Quit: brb) |
14:18:18 | FromDiscord | <Joe-23> sent a long message, see http://ix.io/2uqT |
14:22:03 | * | drewr joined #nim |
14:25:11 | Zevv | InventorMatt: do you run nim_arduino from git or from nimble? |
14:25:23 | Zevv | I updated the git repo, but I don't have my gitlab credentials here so I can't make a new release |
14:26:12 | disruptek | i have your password written down somewhere; gimme a sec. |
14:26:41 | FromDiscord | <InventorMatt> zevv: I run it from nimble |
14:28:55 | FromDiscord | <djazz> How can I check whether a proc has a return type or not in a template? I send it in as an untyped |
14:29:15 | FromDiscord | <Clyybber> if its untyped then theres no way to |
14:29:29 | FromDiscord | <Clyybber> you could forward it to a something that takes typed |
14:29:32 | FromDiscord | <Clyybber> and check there |
14:36:16 | Zevv | InventorMatt; dang |
14:36:24 | Zevv | oh wait I only need to tag |
14:37:50 | Zevv | InventorMatt: oh you do a nimble install with the git url, right? |
14:37:55 | Zevv | you should be good now then |
14:41:57 | FromDiscord | <InventorMatt> after updating i am now getting a new more interesting error https://pastebin.com/3uwUDx2s |
14:45:30 | Zevv | yeah you have spaces in your paths |
14:45:34 | Zevv | this was never tested I guess |
14:46:35 | Zevv | I think this might be a though one to crack, I think I'm losing the original quotes somewhere |
14:50:24 | Zevv | this always makes me kind of mad. I *know* spaces are valid in file names and so on, but was it *that* hard for MS not to put it in each and every program by calling that directory "Program Files" |
14:51:18 | Zevv | problem is that arduino studio puts that stuff in {includes}, and I pass that along in platform.local.txt |
14:51:42 | Zevv | but at that point there is no telling anymore where the original arguments start and end. It is one single variable called {includes} |
15:03:13 | * | dddddd quit (Ping timeout: 265 seconds) |
15:05:24 | FromDiscord | <InventorMatt> if the spaces in the file path is the problem then maybe I'll try installing arduino on wsl and seeing if i can get it to run from there then |
15:06:32 | Zevv | maybe installing it in c:\arduino would also help |
15:06:45 | Zevv | I can break it on linux too by moving it in a directory with spaces |
15:07:23 | Zevv | but I'm not sure if I can make this work. The problem is this extra layer of passing through the fake compiler. I get a single {includes} which can consist of multiple -Idir parts. If these dirs have spaces, the whole thing is ambigious |
15:07:50 | Zevv | with wsl you might be having problems with accessing your programmer hardware |
15:09:00 | FromDiscord | <InventorMatt> true, that is possible. you may want to post a warning on the readme for now then about having spaces in the path |
15:10:25 | Zevv | well, I'm happy to see that this even works at all on windows |
15:10:30 | Zevv | never tested, never aimed for that |
15:12:24 | Zevv | Let me know if you get it to work one way or the other, I'll add a note to the readme |
15:14:39 | * | hnOsmium0001 joined #nim |
15:16:46 | * | dddddd joined #nim |
15:19:05 | disruptek | aren't strings wonderful? |
15:21:07 | Oddmonger | yes on my guitar |
15:21:22 | FromDiscord | <InventorMatt> Zevv, after creating a new folder and changing the path so far it is now throwing any errors but it is taking ages to compile so far and almost seems to freeze |
15:22:11 | * | NimBot joined #nim |
15:23:34 | FromDiscord | <InventorMatt> *not |
15:25:46 | * | liblq-dev joined #nim |
15:31:01 | FromDiscord | <InventorMatt> yeah, after waiting at least 5+ minutes it doesn't seem like it is compiling at all. just frozen there |
15:31:46 | * | synshroud_ joined #nim |
15:32:13 | Zevv | bah |
15:32:14 | * | synshroud quit (Ping timeout: 260 seconds) |
15:32:35 | Zevv | seems i need to find myself a windows computer if i want to get this to work :( |
15:47:14 | FromDiscord | <gokr> @Araq If "I like it" was aimed at our game - then thanks! 🙂 Nim + ORX is delivering very nicely. The physics you can see is LiquidFun which is integrated in ORX. The game is actually just 760 lines of Nim code so far. |
15:56:12 | Zevv | xtank! |
15:58:26 | * | tribly quit (Quit: WeeChat 2.9) |
15:59:18 | Zevv | or what was it called. in the 90s |
15:59:23 | Zevv | on unix workstations |
15:59:31 | Zevv | that was so great |
16:05:10 | * | tribly joined #nim |
16:05:37 | disruptek | remember netrek? |
16:06:14 | FromDiscord | <gokr> We are going for a tad of retro - but focusing on good gameplay and pysics, and above all - plots of players in sofa in front of big TV. |
16:06:30 | FromDiscord | <gokr> (edit) 'pysics,' => 'physics,' | 'plots' => 'lots' |
16:07:06 | FromDiscord | <Varriount> Hmm. I'm a 90's kid, so I grew up on point+click adventure games. And flash games |
16:08:04 | FromDiscord | <Varriount> My favorite was a turn-based strategy game called "Spybot: The Nightfall Incident". |
16:17:44 | FromDiscord | <mratsim> Spybot: Search & Destroy |
16:30:15 | disruptek | Zevv: dust is for minimizing any bug, but initially it will be limited to sem bugs. |
16:35:42 | leorize[m] | the ultimate nimsuggest fuzzer? |
16:36:55 | leorize[m] | s/fuzzer/bug isolator/ |
16:37:40 | disruptek | not really; i don't want to fuck with invalid ast at all. |
16:41:02 | disruptek | but, i don't know of anything similar. i hope that it will help make integrating the compiler less onerous for people. |
16:42:01 | disruptek | there's a lot you can do before you actually pass code to the backend. |
16:48:00 | FromDiscord | <Avatarfighter> What's up party people and disruptek |
16:48:02 | FromDiscord | <Avatarfighter> 😛 |
16:48:17 | disruptek | dude. |
16:48:29 | FromDiscord | <Avatarfighter> hahah how are you doing today disruptek ? |
16:49:05 | FromDiscord | <Avatarfighter> working on anything interesting today ? |
16:49:08 | disruptek | survivin'. |
16:49:12 | disruptek | how are you, fighter/ |
16:49:34 | FromDiscord | <Avatarfighter> Doing pretty good, I'm downloading devel on 500kbps atm |
16:49:57 | FromDiscord | <Avatarfighter> the download bar has never been so entertaining before |
16:50:44 | disruptek | i have 1mbit upload here. every morning i spend a couple hours wondering if i really need backups. |
16:51:12 | disruptek | why are you running devel? |
16:51:15 | disruptek | or, hoping to? |
16:51:23 | FromDiscord | <Avatarfighter> LMAO |
16:51:40 | FromDiscord | <Avatarfighter> I'm just curious to see what changes devel has to offer compared to stable release |
16:52:03 | FromDiscord | <Avatarfighter> other than numerous bugs |
16:52:21 | disruptek | aged to perfection. |
16:52:28 | disruptek | exquisite bugs. |
16:52:47 | FromDiscord | <Avatarfighter> I'm looking for those free-range, cage-less bugs I've heard devel has to offer |
16:53:02 | disruptek | they're not all organic, you know. |
16:53:11 | disruptek | zevv has filed a few artificial ones. |
16:53:14 | FromDiscord | <Avatarfighter> Whaa! I'm possible |
16:53:18 | FromDiscord | <Avatarfighter> impossible* |
16:53:30 | FromDiscord | <Avatarfighter> I can't believe Zevv has done this |
16:53:45 | disruptek | it's true. he has strange ideas and vast quantities of BGH. |
16:53:50 | disruptek | bug growth hormone. |
16:53:55 | FromDiscord | <Avatarfighter> ahahah |
16:54:06 | disruptek | netherlands, y'know. |
16:54:17 | FromDiscord | <Avatarfighter> Netherlands is wild |
16:54:36 | FromDiscord | <Avatarfighter> The way to not have bugs is to only test your code one way so it never breaks |
16:54:44 | FromDiscord | <Avatarfighter> maybe that should be applied to devel to remove all the bugs |
16:57:53 | * | superbia3 joined #nim |
16:57:56 | disruptek | we now have a bot that removes bugs for us. |
16:57:57 | shashlick | who has used fuzzing in the past |
16:58:02 | * | vicfred joined #nim |
16:58:07 | * | liblq-dev quit (Quit: WeeChat 2.9) |
16:59:32 | alehander92 | hm |
17:01:06 | * | superbia2 quit (Ping timeout: 256 seconds) |
17:01:36 | disruptek | shashlick: varriount is working on a fuzzing project. |
17:02:41 | FromDiscord | <Avatarfighter> What are you trying to fuzz shashlick if i may ask? |
17:03:18 | FromDiscord | <Clyybber> @Avatarfighter did you git clone --depth 1 ? |
17:03:33 | FromDiscord | <Avatarfighter> I did not @Clyybber |
17:03:41 | FromDiscord | <Avatarfighter> Do you think it'll help ? |
17:03:45 | FromDiscord | <Clyybber> yeah |
17:03:46 | FromDiscord | <Clyybber> a lot |
17:04:04 | FromDiscord | <Avatarfighter> Ok i'll do that hahah |
17:04:15 | FromDiscord | <Avatarfighter> Rip the download bar you were fun and long |
17:04:19 | shashlick | just looking at https://github.com/status-im/nim-testutils/blob/master/testutils/fuzzing/readme.md |
17:04:31 | shashlick | and wondering how it can be applied to my projects |
17:05:27 | FromDiscord | <Avatarfighter> Oh yeah that looks super interesting! |
17:06:35 | FromDiscord | <Recruit_main707> why is this pr still not pushed?↵https://github.com/nim-lang/Nim/pull/11920↵↵i asked it in the conversation itself, but maybe someone can give me a faster answer in here. |
17:06:36 | disbot | ➥ gc_regions: cleanup & fixes for deallocation |
17:14:50 | FromDiscord | <Clyybber> no particular reason |
17:14:53 | FromDiscord | <Clyybber> I think |
17:15:07 | FromDiscord | <Clyybber> other than that it broke code that was previously "working" as in leaking |
17:20:02 | Zevv | who needs regions anyway, deprecate that stuff the second arc is out |
17:20:10 | disruptek | shhh |
17:20:15 | Zevv | oh sorry |
17:20:17 | disruptek | regions is cool. |
17:20:25 | FromDiscord | <Recruit_main707> deletethis |
17:20:41 | Zevv | i never got my regions back, there is always something sticking behind |
17:20:57 | FromDiscord | <Recruit_main707> it would be cooler if they worked though :P |
17:21:46 | Zevv | even |
17:22:05 | * | sagax quit (Ping timeout: 240 seconds) |
17:24:07 | awe002 | is there a way to get a variable initialized (data section) with the address of another variable? |
17:24:19 | awe002 | something like this c code: int a; int* ptr = &a; |
17:25:26 | awe002 | I tried different things with const, compileTime, but I only could get the initialization of 'ptr' at runtime, init of the module |
17:25:57 | * | Pisuke joined #nim |
17:26:46 | * | MyMind quit (Ping timeout: 246 seconds) |
17:34:12 | Zevv | you can do "var a:int; let p = a.addr" |
17:34:35 | Zevv | that translates quite literary to your c snippet |
17:34:46 | FromDiscord | <Clyybber> he wants a to be in the data section |
17:34:47 | FromDiscord | <Clyybber> I think |
17:36:27 | FromDiscord | <Clyybber> I think you just have to make sure your a is let and the rhs is constant |
17:36:28 | awe002 | yes, when I do that, nim puts p in bss, and add init code to get the address, unlike the code in c, which will put both in data |
17:36:51 | Zevv | ah right |
17:38:39 | * | mbuchel quit (Quit: WeeChat 2.8) |
17:39:37 | FromDiscord | <Clyybber> @exelotl probably knows how to do it |
17:39:57 | Zevv | i think this needs some .emit. |
17:40:40 | Zevv | or what was it. we also needed that to get lets properly in .text |
17:40:50 | Zevv | instead of having a .data copy always |
17:41:09 | Zevv | that matters on tiny archs like avr |
17:41:50 | FromDiscord | <Clyybber> https://github.com/nim-lang/Nim/blob/devel/tests/ccgbugs/tprogmem.nim is similar |
17:41:51 | Zevv | nah data/bss, sorry |
17:41:55 | Zevv | right |
17:42:17 | awe002 | yes, I am on embedded, trying nim on a custom riscv32 |
17:42:25 | FromDiscord | <exelotl> Oh hi! |
17:42:51 | Zevv | awe002: check back here when PMunch is in, he spent some proper time on avr optimizations |
17:43:05 | Zevv | awe002: using arc and os:any? |
17:44:41 | awe002 | Zevv: ok, thx |
17:45:29 | Zevv | are you? using arc and os:any? |
17:46:10 | awe002 | no, gc:none and os:standalone |
17:47:24 | Zevv | you might to consider those. --gc:arc -d:usemalloc --os:any runs on about everything, and most of the stdlib is usable |
17:47:30 | awe002 | I want to start with the basics (easier to inspect the generated c and asm), before going to arc/orc |
17:48:10 | * | superbia3 is now known as superbia |
17:48:12 | * | superbia quit (Quit: WeeChat 2.9) |
17:48:13 | Zevv | https://nim-lang.org/docs/nimc.html#nim-for-embedded-systems |
17:48:18 | Zevv | fair enough |
17:49:52 | * | endragor quit (Remote host closed the connection) |
17:50:20 | * | endragor joined #nim |
17:54:23 | FromDiscord | <exelotl> awe002: the solution depends on what kind of data you need really. I made an RFC a while back but only a small portion of it got implemented. Basically you can do let myVar = [1,2,3] and myVar will probably end up as const in the generated C code |
17:57:28 | FromDiscord | <exelotl> (Then you have to use unsafeAddr to get the address, since its a let variable) |
17:57:40 | FromDiscord | <exelotl> But its limited to some simple arrays/objects. You can't make a constant pointer to constant data this way. |
17:57:52 | awe002 | exelotl: the usecase I am trying is a table with pointers/len to other structures, all in .data |
17:58:06 | awe002 | exelotl: so it's a const ptr to const data |
17:59:57 | FromDiscord | <djazz> when using newAsyncHttpServer and serve, how can I get the listening ip and port? the socket is private :/ |
18:00:07 | * | endragor quit (Ping timeout: 265 seconds) |
18:01:40 | FromDiscord | <exelotl> awe002: yeah, that's pretty tricky to do. A Nim-friendly way I found recently, is to put all your data in a `const` array of objects (nim const, not C const), and then, instead of using pointers, use an enum to index the array |
18:03:03 | FromDiscord | <exelotl> Alternatively, you can put your data in C code, and then import it into Nim as a `var` and use it unsafely that way |
18:04:25 | awe002 | exelotl: exelotl: I'd rather stay with the current runtime init of the pointers, or try the emit/codegenDecl, because array of object will take the maimum object size afaic, and I have very different object sizes |
18:26:58 | FromDiscord | <djazz> how can I use async/await while having a blocking gui loop? threadpool and serve instead of async? |
18:35:04 | Zevv | it's kind of tricky. You could do async in one thread, and do your gui in the other, and have them communicate over a pipe or socketpair |
18:36:49 | FromDiscord | <Rika> what i did is that i made the gui loop "async" as in whenever a delay is needed i used `await sleepAsync` |
18:37:07 | FromDiscord | <Rika> (edit) 'is' => 'dor a similar projec tis' |
18:37:13 | FromDiscord | <Rika> (edit) 'projec tis' => 'project is' |
18:38:01 | disruptek | dafuq |
18:38:13 | Zevv | zup |
18:40:01 | Zevv | you just can't do that, you know. Go "dafuq" and not eloborate on the cause |
18:40:15 | FromDiscord | <Rika> prolly me existing lol |
18:44:29 | Zevv | so, what's new |
18:46:07 | FromDiscord | <dom96> It's easy peasy |
18:46:18 | disruptek | pondering how to structure dust. |
18:46:46 | disruptek | the compiler crashes too easily. |
18:46:54 | FromDiscord | <dom96> @djazz depends on your GUI framework, but generally you just register a timer and call asyncdispatch.poll in it |
18:47:15 | Zevv | disruptek: why dust |
18:47:35 | disruptek | whaddya mean? |
18:47:39 | Zevv | why |
18:47:43 | Zevv | are you doing this |
18:47:53 | alehander92 | what is it |
18:48:16 | Zevv | oh it's your reducer, right? |
18:48:19 | Zevv | nimreduce |
18:48:23 | dom96 | a tool to turn the Nim compiler to dust duh |
18:48:39 | disruptek | yes. |
18:48:44 | Zevv | dude |
18:48:47 | Zevv | don't stop |
18:49:16 | alehander92 | a fuzzer |
18:49:17 | alehander92 | ? |
18:49:23 | Zevv | creduce for nim |
18:49:31 | Zevv | give it a program that generates error X |
18:49:44 | Zevv | then it throws out stuff and more stuff until no more stuff cacn be thrown out |
18:49:50 | Zevv | all the wile making sure it still generates error X |
18:49:55 | Zevv | is that about right? |
18:49:59 | disruptek | basically, yes. |
18:50:11 | disruptek | but it won't just elide stuff, it will mutate things, too. |
18:50:36 | disruptek | unfortunately, the compiler is pretty grumpy about stuff. |
18:50:38 | Zevv | was there anything you could learn from the c-reduce thing? |
18:50:47 | * | WilhelmVonWeiner joined #nim |
18:50:53 | disruptek | yeah, that i don't feel i need to write 50k loc to do this. |
18:51:05 | Zevv | yeah, but that's C for you |
18:51:08 | disruptek | the transformations will be syntactically correct, always. |
18:51:11 | Zevv | I guess they implemented half a compiler for that |
18:51:16 | disruptek | pretty much, yes. |
18:51:47 | Zevv | so, for cps we're stuck in the mud, right? |
18:51:56 | disruptek | afaik, yes. |
18:52:14 | Zevv | damn. I tried to dig into the compiler to see if I could make any sense of these bugs, but pfff man |
18:52:23 | Zevv | it's holidays, you know |
18:52:31 | disruptek | i do know that. |
18:52:59 | disruptek | well, #35... we could figure out how we want to handle this. |
18:53:45 | disruptek | i assume that we add a proc(c: Cont; x, y: int): Cont, right? |
18:53:53 | Zevv | it would be cool to have something working end to end again, actually |
18:54:03 | Zevv | yeah I guess so |
18:54:34 | Zevv | but that is basically "the continuation version", afaik there is always just 2 versions |
18:54:42 | Zevv | the booty and the cpsCall |
18:54:52 | Zevv | why more? |
18:55:35 | disruptek | i forget. i created this issue because you need a way to pump your iterator. |
18:55:46 | disruptek | can you do that with cpsMagic? |
18:56:07 | Zevv | no, that's just the "internal" generated fn(c: C): C procs only |
18:56:22 | Zevv | the booty and cpsCall are the only ones needed to get started, to jump in |
18:56:32 | Zevv | after that all splits are of the above signature, these get tramped |
18:56:33 | disruptek | does the iterator work right now? |
18:56:53 | Zevv | it works, apart from passing the initial vars to the booty because of the ident/gensym |
18:57:24 | * | endragor joined #nim |
18:57:47 | Zevv | oh it *worked* yesterday |
18:57:50 | disruptek | we should think about what the first version of cps should support. maybe we can make a real release when typed is done. |
18:57:51 | Zevv | damn |
18:58:12 | Zevv | basically I want all my stuff in stash to run |
18:58:22 | Zevv | iterator, echo server, goto |
18:58:32 | Zevv | that is enough to get this stuff running "in real life" |
18:58:35 | * | sagax joined #nim |
18:58:45 | disruptek | fair enough. |
18:58:46 | Zevv | from there I hope we can go optimize this stuff to avoid spurious splitting |
18:58:57 | Zevv | the iterator should need 1 split only, I guess |
18:59:01 | disruptek | the symbol substitution looks really good to me. |
18:59:10 | disruptek | except for the fact that nim is buggy, i mean. |
18:59:25 | Zevv | let me see if I can get iterator back to work |
18:59:41 | disruptek | i don't think it's possible right now. |
18:59:51 | Zevv | well, you broke it :) |
19:00:04 | disruptek | i threw out a fair amount of old code on the assumption that clyybber would be able to fix this stuff. |
19:00:19 | Zevv | works with HEAD^ |
19:00:26 | Zevv | ok cool |
19:01:28 | FromDiscord | <Varriount> Araq: Would it be viable to give a macros access to there AST "ahead" of its invocation? That is, the part of the tree that hasn't been semantically checked yet? |
19:02:06 | disruptek | that's what `untyped` is. |
19:02:10 | Zevv | isn't tht waht untyped is |
19:02:17 | Zevv | yeah, what he said |
19:02:30 | Zevv | oh readin time again |
19:03:43 | FromDiscord | <Varriount> Zevv, disruptek: I"m talking about giving it access the to AST in the rest of the file. |
19:04:12 | * | FromDiscord quit (Remote host closed the connection) |
19:04:16 | disruptek | oh, i remember this idea now. |
19:04:26 | disruptek | yeah, i still hate it. 😁 |
19:04:26 | * | FromDiscord joined #nim |
19:05:07 | * | endragor quit (Ping timeout: 246 seconds) |
19:06:04 | * | Trustable quit (Remote host closed the connection) |
19:14:20 | * | endragor joined #nim |
19:23:10 | Zevv | how cool would that be right |
19:23:35 | Zevv | and then the rest of all imported files as well, right |
19:25:12 | * | superbia joined #nim |
19:25:32 | * | endragor quit (Ping timeout: 256 seconds) |
19:31:28 | federico3 | https://semgrep.dev/ this could be useful |
19:44:04 | * | superbia quit (Quit: WeeChat 2.9) |
19:51:38 | Araq | Varriount: should be made avaliable via compiler plugins IMO |
19:51:57 | Araq | and ideally compiler plugins are at least as easy to write as macros |
19:52:13 | Araq | I consider this the next steps in Nim's evolution |
19:52:37 | federico3 | dom96: this could be a good reference for Nimble https://arxiv.org/pdf/2005.09535.pdf |
19:54:19 | disruptek | Araq: where are we supposed to put state we want to make available to passes? |
19:58:12 | Araq | disruptek, in the compiler new passes inherit from PPassContext |
19:58:36 | * | endragor joined #nim |
19:58:44 | Araq | in the macro system, you can get away with .compileTime variables but it's a crude, modularity breaking mechanism |
19:59:02 | disruptek | i know, but how can i put data into a pass from outside the pass? or take data out? |
20:00:36 | disruptek | i guess taking data out isn't a challenge. |
20:02:52 | disruptek | i'd like it to be easier to control the error handling behavior, too. there are a lot of quits lying around. |
20:03:23 | disruptek | i can hook errors, but the hook happens in addition to output and quits, etc. |
20:04:10 | bung | how async yield work together? |
20:05:46 | FromDiscord | <Recruit_main707> when compiling nim from devel, should i worry if this happens? https://media.discordapp.net/attachments/371759389889003532/745010499787292843/unknown.png |
20:06:06 | FromDiscord | <Recruit_main707> `Hint: operation successful (128812 lines compiled; 21.993 sec total; 327.473MiB peakmem; Dangerous Release Build) [SuccessX]`↵`FAILURE` (for IRC) |
20:06:22 | disruptek | looks dangerous. |
20:08:10 | FromDiscord | <Recruit_main707> it seems like it worked (?) the nim exe is there, also the nimsuggest one, but thats it, is that correct? |
20:11:47 | * | endragor quit (Ping timeout: 240 seconds) |
20:16:34 | disruptek | unlikely. |
20:20:39 | FromDiscord | <Recruit_main707> ill just wait for tomorrow's nightly build then |
20:20:51 | FromDiscord | <Recruit_main707> the regions fix was merged btw :) |
20:22:06 | Araq | disruptek, are you talking about the compiler code? |
20:22:17 | FromDiscord | <19> hello, im getting this error:https://pastebin.com/XLarRDUE after i run `nimble init` |
20:22:29 | disruptek | i'm working on a program that implements the compiler. |
20:22:41 | disruptek | !repo dust |
20:22:41 | disbot | https://github.com/disruptek/dust -- 9dust: 11Dust: Unattended Syntax Truncation 15 0⭐ 0🍴 7& 1 more... |
20:23:14 | disruptek | it'll permute the ast to try to minimize tests while reproducing errors. |
20:23:50 | disruptek | if anyone can point me at a working compiler plugin, maybe it can inform my approach. |
20:25:23 | disruptek | https://github.com/disruptek/dust/blob/master/dust/pass.nim |
20:25:27 | bung | can i yield item one by one in a async proc ? |
20:26:21 | disruptek | you can have an iterator yield futures. |
20:26:26 | Araq | ah |
20:28:18 | disruptek | if you want a truly async iterator, i think you probably need something more like cps. |
20:28:21 | disruptek | !repo cps |
20:28:23 | disbot | https://github.com/disruptek/cps -- 9cps: 11Continuation-Passing Style for Nim 🔗 15 29⭐ 1🍴 |
20:28:31 | bung | then I can't use await before yield |
20:30:19 | disruptek | no, but you can yield before await. |
20:30:46 | disruptek | i think. i can't remember. try it and find out. |
20:31:20 | bung | iterator cant have the async pragma the editor hints |
20:31:37 | disruptek | right, i cannot find any such animal in my async code. |
20:31:48 | disruptek | just yield futures and then await them elsewhere. |
20:31:55 | disruptek | or, seriously, look at cps. |
20:33:07 | bung | even this done, how to do await item in myitems()? |
20:33:37 | bung | I haven't seen some code like that |
20:33:39 | disruptek | what? |
20:33:52 | disruptek | you haven't seen code like that because it's not possible. |
20:34:37 | bung | yeah, not like js have done that parts. |
20:35:40 | * | disruptek is now known as clippy |
20:35:49 | clippy | it sounds like you're trying to write an async iterator! |
20:36:46 | bung | yeah, that's what I want but can't do with a iterator proc with async pragma. |
20:37:00 | clippy | shall i provide the url for the cps repository that demonstrates such creatures? |
20:39:42 | bung | no ,thanks! I dont want change current mode, but add it to your repo's example seems nice |
20:40:03 | clippy | there are examples in stash/ |
20:40:06 | * | clippy is now known as disruptek |
20:41:42 | bung | ah , I checked just now |
20:42:06 | FromDiscord | <Kiloneie> Man reading online about what people think of Nim is just depressing, and more often than not it's metaprogramming is completely skipped over. I should make a whole video series just on metaprogramming and or all the amazing features of it. |
20:46:38 | FromDiscord | <19> i agree, nim needs more presence and more love online. |
20:47:24 | FromDiscord | <Hearthstone> Yes |
20:56:05 | * | vicfred quit (Quit: Leaving) |
21:04:02 | hnOsmium0001 | scheme: I've heard you talking about metaprogramming? /s |
21:04:14 | hnOsmium0001 | more generally lisp family |
21:11:23 | * | Vladar quit (Quit: Leaving) |
21:12:13 | * | awe002 quit (Ping timeout: 264 seconds) |
21:14:39 | * | endragor joined #nim |
21:27:26 | FromDiscord | <Elegant Beef> @Kiloneie I mean the metaprogramming is never a reason i hear someone say that doesnt want to use nim. It's significant whitespace, or from the rust guys, lacking anything new |
21:27:45 | * | thomasross joined #nim |
21:28:14 | FromDiscord | <Elegant Beef> My favourite quote ever was "You dont run the code" |
21:28:28 | disruptek | wut |
21:29:16 | FromDiscord | <Elegant Beef> Yep, that was my reaction |
21:29:23 | * | endragor quit (Ping timeout: 240 seconds) |
21:29:26 | FromDiscord | <Elegant Beef> As if Rust or any other language is ran as is |
21:29:47 | FromDiscord | <Rika> what the fuck does "you dont run the code" mean |
21:30:02 | disruptek | YOU CAN'T HANDLE THE RUNTIME! |
21:30:15 | * | abm quit (Quit: Leaving) |
21:30:35 | FromDiscord | <Elegant Beef> It means that nim is converted to C which they see differently than converting to LLVM |
21:30:56 | FromDiscord | <Rika> sounds immensely dumb or ignorant |
21:31:26 | FromDiscord | <Elegant Beef> I could always ping the person that said it if i really wanted to, as he's in the discord 😄 |
21:32:24 | FromDiscord | <Elegant Beef> He's also said "It doesnt do anything new" |
21:32:30 | FromDiscord | <Rika> im not the best person to argue with |
21:32:36 | disruptek | indeed. |
21:32:36 | FromDiscord | <Elegant Beef> So it's a wild world of "Ok...and?" |
21:32:37 | FromDiscord | <Rika> you can ask disruptek and he'll agree |
21:32:41 | FromDiscord | <Rika> see |
21:33:22 | FromDiscord | <Rika> what do you mean it doesnt do anything new |
21:33:38 | FromDiscord | <Rika> if you dig deep enough into languages you can argue that RUST doesnt do anything new |
21:34:02 | FromDiscord | <Rika> probably, i didnt dig deep enough to defend that |
21:34:27 | FromDiscord | <Elegant Beef> I mean ownership is what he says is new |
21:35:07 | FromDiscord | <Rika> well new features arent usually the jewels of languages anyway, its the execution of features that are |
21:35:13 | FromDiscord | <Rika> the implementation rather |
21:35:39 | FromDiscord | <Rika> its just that rust nailed (?) the implementation of a new (?) feature, ownership |
21:35:50 | * | awe002 joined #nim |
21:35:54 | disruptek | nah. |
21:35:58 | disruptek | it's a huge pita. |
21:36:01 | FromDiscord | <Rika> see the (?) s |
21:36:03 | FromDiscord | <Rika> i know it is |
21:36:05 | FromDiscord | <Rika> i tried it |
21:36:08 | FromDiscord | <Rika> i noped the fuck out |
21:36:12 | FromDiscord | <Elegant Beef> But muh safety! |
21:36:17 | disruptek | i would say that arc nails it. |
21:36:20 | FromDiscord | <Rika> but muh productivity |
21:36:30 | * | solitudesf quit (Ping timeout: 256 seconds) |
21:36:36 | FromDiscord | <Rika> oh |
21:36:41 | FromDiscord | <Rika> how is arc not a new feature? |
21:36:47 | FromDiscord | <Rika> ask that to them |
21:36:53 | FromDiscord | <Rika> or if theyre seeing this, hello |
21:36:58 | FromDiscord | <Elegant Beef> They dont look in here |
21:37:08 | FromDiscord | <Rika> so ignorance |
21:37:36 | FromDiscord | <Rika> maybe you were just bad at showcasing nim 😛 |
21:39:02 | FromDiscord | <Elegant Beef> Lol after this joke implementation he did say "Nim is so compact and ugly" |
21:39:06 | FromDiscord | <Elegant Beef> https://play.nim-lang.org/#ix=2sJV |
21:39:54 | FromDiscord | <Rika> did you write that? |
21:39:59 | FromDiscord | <Rika> ~~it looks bad~~ |
21:40:18 | disruptek | i just puked a little in my mouth. |
21:40:21 | FromDiscord | <Elegant Beef> inb4 you complain about X thing |
21:40:38 | FromDiscord | <dom96> That looks like Nim written by a C programmer |
21:40:52 | FromDiscord | <Rika> who wrote that then |
21:40:55 | FromDiscord | <dom96> that if statement at least |
21:40:56 | FromDiscord | <Elegant Beef> I did |
21:41:01 | FromDiscord | <Rika> jesus |
21:41:03 | FromDiscord | <Elegant Beef> Dude i write ifs with `()` |
21:41:09 | FromDiscord | <Rika> why thoi |
21:41:11 | FromDiscord | <Rika> (edit) 'thoi' => 'tho' |
21:41:27 | FromDiscord | <Elegant Beef> i prefer the seperation it gives, easier for my generally misreading mind to see the logic |
21:41:28 | FromDiscord | <Recruit_main707> ^ |
21:41:35 | FromDiscord | <dom96> habits eh? |
21:41:36 | FromDiscord | <Elegant Beef> I often misread stuff |
21:41:43 | FromDiscord | <Elegant Beef> So with those there things dont flow into shit |
21:41:45 | FromDiscord | <dom96> at least add a space after the `if` |
21:42:06 | FromDiscord | <Rika> also |
21:42:18 | FromDiscord | <Rika> why do they word "compact" as if that was a bad thing? |
21:42:22 | FromDiscord | <Elegant Beef> Not a clue |
21:42:44 | FromDiscord | <Elegant Beef> I do like how picking apart this insincere implementation was more important than that question 😛 |
21:42:47 | FromGitter | <ynfle> https://play.nim-lang.org/#ix=2utj How can this have side affects? |
21:43:11 | disruptek | exceptions are side-effects. |
21:44:14 | FromDiscord | <dom96> nope |
21:44:18 | FromDiscord | <dom96> global var causes it |
21:44:24 | FromDiscord | <dom96> move the variable into the func and it compiles |
21:44:42 | disruptek | well, it shouldn't. 😁 |
21:45:50 | FromDiscord | <dom96> Well, at least I have the BDFLs support. https://media.discordapp.net/attachments/371759389889003532/745035681989918811/unknown.png |
21:45:58 | disruptek | if you try to execute it, you'll find it produces side-effects. |
21:46:10 | disruptek | https://play.nim-lang.org/#ix=2utk |
21:46:20 | disruptek | i can't help that araq is wrong. |
21:46:27 | disruptek | all i can do is try to teach him something. |
21:46:50 | FromDiscord | <dom96> disruptek: nope, you've got echo in the func https://play.nim-lang.org/#ix=2utl |
21:47:07 | disruptek | oh, you're right. |
21:47:24 | disruptek | well, he's still wrong. |
21:47:39 | FromDiscord | <Kiloneie> To me Nim is in overall an excelent package, which other language can say the same? A lot of them have huge flaws or ancient design. Doesnt do anything new... |
21:48:03 | FromDiscord | <dom96> Why do you consider exceptions to be side effects? |
21:48:15 | FromDiscord | <Recruit_main707> Tbh, Nim has some tiny flaws |
21:48:16 | disruptek | what else could they be? |
21:48:20 | FromDiscord | <Rika> nim has flaws |
21:48:35 | FromDiscord | <dom96> They're more like return values |
21:48:41 | FromDiscord | <Kiloneie> Yeh but not like Java ones. |
21:48:43 | FromDiscord | <dom96> You'll get the same exception for the same inputs |
21:49:41 | disruptek | i'm afraid i don't have the patience to go through this argument again. |
21:49:56 | disruptek | exceptions are not alloc-free, ergo they have side-effects. |
21:50:06 | FromDiscord | <Rika> alloc free? |
21:50:23 | FromDiscord | <Rika> as in literally alloc free? |
21:50:30 | FromDiscord | <Varriount> They allocate memory from the heap |
21:50:47 | FromDiscord | <Rika> then that would make creating a ref within the function count as a side effect no? |
21:51:12 | FromDiscord | <Varriount> Don't forget a function call - that allocates stack memory |
21:51:54 | FromDiscord | <dom96> lol wat |
21:52:07 | FromDiscord | <Rika> i dont know with dis |
21:52:21 | FromDiscord | <Varriount> Calling a function increases the stack pointer |
21:52:23 | FromDiscord | <dom96> Pretty sure that's not the commonly accepted definition of "side effect free" |
21:52:31 | FromDiscord | <dom96> allocs don't matter |
21:52:52 | * | Cthalupa quit (Ping timeout: 256 seconds) |
21:53:10 | FromGitter | <ynfle> @dom96, it was a `let` not `var` |
21:54:00 | disruptek | it's not important to me that you agree. |
21:54:03 | FromDiscord | <Rika> maybe it would be useful to have both definitions? though the other definition i still dont understand so im not sure if this is a good idea either |
21:54:12 | FromDiscord | <dom96> ynfle: what do you mean? |
21:54:40 | disruptek | does anyone know of a compiler plugin for nim? or is this just a myth that araq trots out to explain away feature requests? |
21:54:41 | FromDiscord | <dom96> disruptek: well, it's certain that at least Nim's definition is different to yours. Can you name a language that follows your definition? |
21:54:50 | FromGitter | <ynfle> I thought `let x = "hello"` means x is imutable |
21:54:58 | disruptek | maybe, but as i said, i don't have the patience for this right now. |
21:55:28 | FromDiscord | <dom96> ynfle: yes, I actually think it may be a bug that it gives you that error when that is a global |
21:55:38 | FromDiscord | <dom96> so please report on github |
21:55:47 | FromGitter | <ynfle> Ok 👍 |
21:56:11 | FromGitter | <ynfle> It wasn't discovered by me so I'll credit that person |
21:57:45 | FromDiscord | <Elegant Beef> Isnt the issue that the let from global scope could be mutated by the unsafeaddr? |
21:58:08 | FromDiscord | <Elegant Beef> So the reference of the immutable table is an issue, or am i looney? |
21:58:23 | FromDiscord | <Elegant Beef> https://play.nim-lang.org/#ix=2utp this here |
21:58:57 | FromGitter | <ynfle> Why is that different for `const`? |
21:59:19 | FromDiscord | <Elegant Beef> `/usercode/in.nim(10, 3) Error: expression has no address` |
21:59:51 | FromGitter | <ynfle> Aha |
22:00:03 | FromDiscord | <dom96> they're not using unsafeAddr though |
22:00:38 | FromDiscord | <Elegant Beef> oh i know, but i just assumed the side effect checker seen the reference to the table, and went "this can have sideeffects", so i am probably wrong to the reason |
22:01:30 | FromGitter | <ynfle> I think he means that because the same tableRef can have different key, value pairs when declared with `let`, It's inherently sideEffect prone |
22:02:21 | FromDiscord | <Elegant Beef> Nah if i meant that i'd have said that |
22:03:07 | FromGitter | <ynfle> ... |
22:03:15 | FromGitter | <ynfle> So what did you mean? |
22:03:57 | FromDiscord | <dom96> nonetheless, this is a bug, speculating about why it's a bug is pointless 🙂 |
22:04:09 | FromDiscord | <Elegant Beef> I was just guessing that the issue appears due to the let being mutable if abusing the unsafeaddr, so if it was referenced inside the func it complains, i have really never used funcs so i just assumed they were only supposed to reference global consts and internally constructed things 😄 |
22:05:26 | FromDiscord | <Elegant Beef> I mean dom based off what i was saying i was implying using a let was wrong, but you're smarter than me so you should know what's proper 😄 |
22:06:16 | FromGitter | <ynfle> Im pretty sure that's what I said |
22:06:54 | FromDiscord | <Elegant Beef> well no you said the key/values arent constant, i was saying cause you can change them inside a proc with unsafeaddr |
22:07:19 | FromGitter | <ynfle> Sorry, that's what I meant |
22:07:30 | FromDiscord | <Elegant Beef> I have no clue if this is a bug, dom indicates it is, so report it as such |
22:08:15 | FromGitter | <ynfle> I shall |
22:08:20 | FromDiscord | <Elegant Beef> My understanding of pure functions is they're supposed to take inputs and use globals only, so this seems fine to me 😄 |
22:09:35 | FromDiscord | <Elegant Beef> Is the side effect checker supposed to be smart enough to check if there is a side effect or only if the body touches variables which could have side effects? |
22:11:23 | FromDiscord | <dom96> Well, just to be clear, I think it's a bug. Araq may disagree with me 🙂 |
22:11:42 | FromDiscord | <dom96> Still worth a report though |
22:11:45 | FromDiscord | <Elegant Beef> Hey i admit im not smart, so i say it'sa bug too 😛 |
22:13:31 | FromGitter | <stisa> @disruptek you mean like https://github.com/nim-lang/Nim/blob/devel/compiler/plugins/locals.nim ? that's the only thing I remember seeing about compiler plugins |
22:14:28 | disruptek | nah. |
22:17:02 | * | Cthalupa joined #nim |
22:19:20 | disruptek | i have a rewrite pass but i don't like having to interface with it using tricks. |
22:20:17 | * | leorize joined #nim |
22:21:12 | FromGitter | <ynfle> How do I enable strict funcs again? |
22:21:45 | FromGitter | <ynfle> Also, where is the `sideEffect`ness of funcs checked in the compiler? |
22:37:34 | leorize | wdym by strict funcs? |
22:39:48 | leorize | looks like it's `{.experimental: "strictFuncs".} |
22:56:43 | * | lritter quit (Quit: Leaving) |
23:00:53 | * | arecacea1 quit (Remote host closed the connection) |
23:01:13 | * | arecacea1 joined #nim |
23:02:12 | * | arecacea1 quit (Remote host closed the connection) |
23:02:42 | * | arecacea1 joined #nim |
23:07:38 | FromDiscord | <19> is this the best way i can write this construction: https://play.nim-lang.org/#ix=2utO ? |
23:08:22 | disruptek | remove :void |
23:08:36 | disruptek | what do you mean by "best way"? |
23:08:46 | FromDiscord | <19> shortest |
23:10:22 | disruptek | https://play.nim-lang.org/#ix=2utR |
23:11:01 | disruptek | typo: s/y/h/ |
23:11:26 | * | vicfred joined #nim |
23:11:50 | FromDiscord | <19> id like this Vector2 type to be inside the Rect() |
23:12:07 | disruptek | you didn't define the Rect. |
23:12:26 | FromDiscord | <19> its from sdl2 |
23:12:33 | disruptek | i noticed that. |
23:12:54 | FromDiscord | <19> ok so i redefine it? |
23:13:18 | disruptek | if you want your own type to be inside it, yes, you probably will need to. |
23:13:49 | disruptek | i would probably do this differently, though. |
23:14:07 | FromDiscord | <19> im trying to learn, please enlighten me |
23:14:17 | FromDiscord | <19> 🐱 |
23:16:09 | disruptek | https://play.nim-lang.org/#ix=2utV |
23:16:26 | disruptek | the idea is that you can specify 2, 3, or 4 values. the second two default to the first. |
23:19:02 | FromDiscord | <19> very cool! |
23:20:05 | FromDiscord | <19> thanks! |
23:45:58 | FromDiscord | <19> its a waste to put the Vector2 with the Rect type since they both have x and y |
23:46:11 | disruptek | sure. |
23:46:20 | FromDiscord | <19> better to use Vec2 outside for calculations and mutate the Rect |
23:46:34 | disruptek | makes sense. |
23:46:49 | * | krux02_ joined #nim |
23:46:50 | FromDiscord | <Clyybber> width and height default to x and y? sounds like a recipe for nicey bugs :D |
23:47:02 | disruptek | shhh |
23:47:14 | disruptek | don't you have some nim bugs to play with? |
23:47:14 | FromDiscord | <19> its just a quick example to show me syntax |
23:47:21 | FromDiscord | <19> xD |
23:47:52 | FromDiscord | <Clyybber> disruptek: heh, the typed bug is fixed, but I'm trying to get rid of nfSem |
23:48:02 | disruptek | why? |
23:48:12 | FromDiscord | <Clyybber> we can probably live without it |
23:48:14 | disruptek | also, that's awesome. |
23:48:30 | FromDiscord | <Clyybber> <3 |
23:48:43 | disruptek | typed proc params? |
23:48:47 | FromDiscord | <Clyybber> but I gotta get some sleep, been awake since 20 hours or so |
23:48:59 | disruptek | aight, peace out. |
23:49:06 | FromDiscord | <Clyybber> gnite |
23:49:07 | FromDiscord | <Clyybber> peac |
23:49:08 | FromDiscord | <Clyybber> e |
23:49:37 | * | krux02 quit (Ping timeout: 260 seconds) |