00:02:14 | * | endragor quit (Ping timeout: 260 seconds) |
00:09:03 | * | hnOsmium0001 quit (Ping timeout: 260 seconds) |
00:10:14 | * | hnOsmium0001 joined #nim |
00:13:31 | * | krux02_ quit (Remote host closed the connection) |
00:13:43 | * | hnOsmium0001 quit (Max SendQ exceeded) |
00:15:15 | * | hnOsmium0001 joined #nim |
00:59:28 | shashlick | That's going to be my next pr |
00:59:36 | shashlick | Nim.cfg interop |
01:00:13 | shashlick | Was called as usecfg in the discussion |
01:00:25 | shashlick | Will need some more thoughts to refine it |
01:01:19 | shashlick | https://gist.github.com/genotrance/35504ed532f9cb836f11fd02b5bf1145 |
01:02:36 | shashlick | Probably the previous revision |
01:08:20 | shashlick | In local deps mode, nimble should only keep one version of a package |
01:15:49 | disruptek | makes sense. |
01:16:14 | * | bunbunbunbunny joined #nim |
01:27:49 | * | JustASlacker quit (Ping timeout: 264 seconds) |
01:47:26 | * | endragor joined #nim |
01:47:50 | * | Jesin joined #nim |
01:48:11 | * | apahl quit (Ping timeout: 244 seconds) |
01:50:11 | * | apahl joined #nim |
02:22:13 | * | bunbunbunbunny quit (Quit: Lost terminal) |
02:26:19 | FromGitter | <jivank> On windows, does anyone know how to use startProcess from osproc but hide the console window it starts? |
02:26:29 | FromGitter | <jivank> Python does something like this https://stackoverflow.com/questions/7006238/how-do-i-hide-the-console-when-i-use-os-system-or-subprocess-call |
02:29:10 | disruptek | nimph without nimble is already 8x faster. |
02:30:23 | * | muffindrake quit (Ping timeout: 272 seconds) |
02:31:52 | * | muffindrake joined #nim |
02:41:44 | silvernode[m] | listening to a break down of LLVM and remembered seeing somewhere that Nim is going to use that as a compiler at some point. Does anyone have a status on this? LLVM is much cooler than I could have ever imagine. |
02:42:00 | disruptek | !repo nlvm |
02:42:01 | disbot | https://github.com/arnetheduck/nlvm -- 9nlvm: 11LLVM-based compiler for the Nim language 15 297⭐ 21🍴 7& 1 more... |
02:42:40 | silvernode[m] | disruptek: is this production ready and able to be used today? |
02:42:46 | silvernode[m] | Any experience with it? |
02:47:12 | * | hello joined #nim |
02:47:21 | disruptek | nope. |
02:58:13 | hello | did this thing https://nim.town hope some of ye find it useful for projcets |
02:58:16 | hello | *projects |
02:58:38 | FromDiscord | <Rika> interesting |
02:58:53 | hello | Thanks |
03:00:01 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
03:00:41 | * | hello quit (Remote host closed the connection) |
03:11:54 | * | thomasross quit (Ping timeout: 272 seconds) |
03:12:54 | * | rockcavera quit (Remote host closed the connection) |
03:15:59 | FromDiscord | <Elegant Beef> Super cool for enabling nimble docs to have websites 😄 |
03:20:47 | shashlick | Github works |
03:21:32 | FromDiscord | <Hearthstone> !repo nim |
03:21:33 | disbot | https://github.com/nim-lang/Nim -- 9Nim: 11Nim is a compiled, garbage-collected systems programming language with a design that focuses on efficiency, expressiveness, and elegance (in that order of priority). 15 9838⭐ 1051🍴 7& 29 more... |
03:21:39 | FromDiscord | <Hearthstone> I'm smart ÙvÚ |
03:21:55 | FromDiscord | <Hearthstone> I'ma manually build Nim so it's bleeding edge |
03:22:10 | FromDiscord | <Hearthstone> Because the Termux binaries aren't exactly up-to-date all the time |
03:22:25 | shashlick | I use ghp-import with nimterop |
03:26:05 | * | vicfred quit (Quit: Leaving) |
03:27:29 | leorize | @jivank add poDaemon to the process option list |
03:40:38 | * | iwq quit (Ping timeout: 260 seconds) |
03:42:21 | * | iwq joined #nim |
04:02:23 | * | Tongir quit (Ping timeout: 265 seconds) |
04:06:02 | * | supakeen quit (Quit: WeeChat 2.8) |
04:06:44 | * | supakeen joined #nim |
04:10:25 | * | Jesin quit (Ping timeout: 264 seconds) |
04:15:08 | * | selk quit (Quit: ) |
04:26:13 | * | dv^_^ quit (Ping timeout: 246 seconds) |
04:28:25 | FromDiscord | <iWonderAboutTuatara> Testing something |
04:28:40 | FromDiscord | <iWonderAboutTuatara> !repo godot |
04:28:41 | disbot | https://github.com/pragmagic/godot-nim -- 9godot-nim: 11Nim bindings for Godot Engine 15 225⭐ 17🍴 7& 11 more... |
04:28:50 | FromDiscord | <iWonderAboutTuatara> Oh it's Nim specific |
04:28:59 | FromDiscord | <iWonderAboutTuatara> !repo gdnative |
04:29:00 | disbot | https://github.com/enthus1ast/godotMulticast -- 9godotMulticast: 11(WIP) a gdnative find_game utilizing ip multicast 15 0⭐ 1🍴 |
04:29:12 | FromDiscord | <iWonderAboutTuatara> Now I'm less sure |
04:42:03 | * | leorize quit (Ping timeout: 240 seconds) |
05:07:01 | * | arecacea1 quit (Remote host closed the connection) |
05:07:23 | * | arecacea1 joined #nim |
05:22:11 | * | hyiltiz quit (Ping timeout: 240 seconds) |
05:47:17 | * | snowolf quit (Remote host closed the connection) |
05:47:34 | * | snowolf joined #nim |
05:50:35 | * | solitudesf joined #nim |
06:06:43 | * | hyiltiz joined #nim |
06:07:16 | * | hyiltiz quit (Client Quit) |
06:08:21 | * | Jesin joined #nim |
06:08:43 | * | hyiltiz joined #nim |
06:22:27 | * | hyiltiz_ joined #nim |
06:22:31 | * | hyiltiz quit (Quit: hyiltiz) |
06:27:06 | * | hyiltiz_ quit (Ping timeout: 258 seconds) |
06:35:26 | * | hyiltiz joined #nim |
06:35:26 | * | hyiltiz quit (Changing host) |
06:35:26 | * | hyiltiz joined #nim |
06:38:52 | * | snowolf quit (*.net *.split) |
06:38:53 | * | dddddd quit (*.net *.split) |
06:38:53 | * | aenesidemus quit (*.net *.split) |
06:38:53 | * | junland quit (*.net *.split) |
06:38:53 | * | mal`` quit (*.net *.split) |
06:38:54 | * | ForumUpdaterBot quit (*.net *.split) |
06:38:54 | * | zama quit (*.net *.split) |
06:38:54 | * | hecanjog quit (*.net *.split) |
06:38:54 | * | voltist quit (*.net *.split) |
06:38:55 | * | nisstyre quit (*.net *.split) |
06:39:45 | * | hyiltiz quit (Ping timeout: 258 seconds) |
06:40:41 | FromDiscord | <iWonderAboutTuatara> How feasible is building a simple game engine in Nim? |
06:40:54 | FromDiscord | <iWonderAboutTuatara> I know you can set the GC to only act at specific times which is super nice |
06:43:43 | * | snowolf joined #nim |
06:43:43 | * | dddddd joined #nim |
06:43:43 | * | aenesidemus joined #nim |
06:43:43 | * | junland joined #nim |
06:43:43 | * | mal`` joined #nim |
06:43:43 | * | ForumUpdaterBot joined #nim |
06:43:43 | * | zama joined #nim |
06:43:43 | * | hecanjog joined #nim |
06:43:43 | * | voltist joined #nim |
06:43:43 | * | nisstyre joined #nim |
06:45:46 | * | snowolf is now known as Guest41431 |
06:50:06 | * | hyiltiz joined #nim |
06:50:06 | * | hyiltiz quit (Changing host) |
06:50:06 | * | hyiltiz joined #nim |
06:58:14 | * | hyiltiz quit (Remote host closed the connection) |
07:01:03 | * | hyiltiz joined #nim |
07:01:03 | * | hyiltiz quit (Changing host) |
07:01:03 | * | hyiltiz joined #nim |
07:03:17 | FromDiscord | <Rika> a lot of people have done so already i think |
07:04:26 | FromDiscord | <Elegant Beef> I mean it's very feasible since you can use opengl/vulkan |
07:04:53 | FromDiscord | <Elegant Beef> And there are frameworks already such as nico and nimgame |
07:11:22 | * | JustASlacker joined #nim |
07:13:24 | * | awe002 joined #nim |
07:48:33 | * | Vladar joined #nim |
07:50:23 | * | iwq quit (*.net *.split) |
07:54:03 | * | PMunch joined #nim |
07:57:38 | FromDiscord | <Varriount> @iWonderAboutTuatara 2d or 3d? |
08:00:08 | FromDiscord | <iWonderAboutTuatara> 2d |
08:00:14 | FromDiscord | <iWonderAboutTuatara> Nothing remotely fancy |
08:00:32 | FromDiscord | <iWonderAboutTuatara> Also, how usable are cpp libs like sdl2 with Nim bindings? |
08:00:37 | FromDiscord | <iWonderAboutTuatara> Seems to not be a great experience |
08:00:56 | FromDiscord | <Elegant Beef> I mean |
08:00:59 | FromDiscord | <Elegant Beef> Nico uses them |
08:01:15 | FromDiscord | <Elegant Beef> Checkout nico and nimgame2 |
08:05:23 | FromDiscord | <iWonderAboutTuatara> Oh I see |
08:05:26 | FromDiscord | <iWonderAboutTuatara> There's docs |
08:05:29 | FromDiscord | <iWonderAboutTuatara> I see |
08:05:36 | FromDiscord | <iWonderAboutTuatara> You're not supposed to use the official version it seems |
08:10:47 | * | opal joined #nim |
08:18:00 | * | Trustable joined #nim |
08:18:45 | * | Trustable quit (Remote host closed the connection) |
08:18:49 | * | Vladar quit (Remote host closed the connection) |
08:22:14 | * | iwq joined #nim |
08:23:20 | FromDiscord | <mratsim> sdl is super easy to use though |
08:24:45 | FromDiscord | <mratsim> I was super beginner in SDL when I wrote this, I basically copy-pasted the SDL2 intro: https://github.com/mratsim/chirp8/blob/master/src/chirp8.nim |
08:26:38 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
08:27:53 | * | krux02 joined #nim |
08:38:41 | FromDiscord | <iWonderAboutTuatara> That's definitely good to hear |
08:38:59 | FromDiscord | <iWonderAboutTuatara> Sfml doesn't seem to have a good binding though |
08:45:08 | * | fowl_ quit (Ping timeout: 265 seconds) |
08:46:46 | FromDiscord | <mratsim> https://media.discordapp.net/attachments/371759389889003532/746289176747442266/unknown.png |
08:47:15 | FromDiscord | <mratsim> seems straightforward to bind |
08:47:18 | * | fowl_ joined #nim |
09:08:20 | FromDiscord | <iWonderAboutTuatara> Oh, I had no idea it was simple to do that |
09:11:09 | FromDiscord | <fracasse> nice browser! |
09:11:18 | FromDiscord | <fracasse> i know it's completely offtopic but just wanted to point that out |
09:15:46 | PMunch | Seems like a reskinned Chrome |
09:15:55 | PMunch | But yeah, looks good |
09:17:41 | * | endragor quit (Remote host closed the connection) |
09:18:08 | * | endragor joined #nim |
09:22:40 | * | endragor quit (Ping timeout: 258 seconds) |
09:28:10 | FromDiscord | <iWonderAboutTuatara> Agreed, |
09:35:05 | zyklon | almost every browser __is__ a reskinned Chrome nowadays :D (or at least looks like one) |
09:35:35 | FromDiscord | <vieru> are there any text compression libraries for nim that don't use external dependencies ? |
09:38:59 | * | endragor joined #nim |
09:42:13 | FromDiscord | <Rika> so pure nim? |
09:42:21 | FromDiscord | <Rika> not that i know of, no |
09:42:36 | FromDiscord | <Rika> since modern compression algos are somewhat complex to implement |
09:43:24 | FromDiscord | <Yardanico> There is snappy implementation |
09:43:43 | FromDiscord | <Yardanico> It's general purpose compression, and should work for text too, but not the best probably |
09:46:58 | FromDiscord | <vieru> i dont really need a pure nim implementation, i just need a algo that i can use without having to drag around dlls |
09:46:59 | FromDiscord | <lqdev> doesn't treeform/snappy use the DLL though? |
09:47:13 | FromDiscord | <vieru> yeah that's what i was gonna say |
09:47:31 | FromDiscord | <vieru> nimsnappy uses libsnappy.dll |
09:49:31 | * | NimBot joined #nim |
09:50:25 | FromDiscord | <vieru> (zip/zlib)[https://github.com/nim-lang/zip] works just fine on windows using git bash↵but when i try to run it through cmd i get `could not find zlib1.dll` |
09:50:53 | FromDiscord | <vieru> (edit) '(zip/zlib)[https://github.com/nim-lang/zip]' => '[zip/zlib](https://github.com/nim-lang/zip)' |
09:51:55 | Zevv | PMunch: you as the avr guy: do you think it makes sense to maintain this nim/arduino golem I created earlier this year? |
09:52:10 | Zevv | i got issue reports, so it seems that people are actually trying to use it |
09:53:51 | * | arecacea1 quit (Remote host closed the connection) |
09:55:45 | * | arecacea1 joined #nim |
09:56:30 | PMunch | Depends on the work it requires to maintain it |
09:57:11 | PMunch | I'm all for the Nim community creating some easy path into using Nim on Arduino, but if that solution in particular requires more work than it's worth to maintain then I'm sure your time is better spent elsewhere |
10:02:40 | FromDiscord | <Rika> @vieru you can try zlibstatic, i think is the namr |
10:02:51 | PMunch | Zevv ^ |
10:05:14 | FromDiscord | <vieru> @Rika thanks, ill try it |
10:06:55 | * | abm joined #nim |
10:18:04 | FromDiscord | <vieru> after some tweaking it worked, thanks again rika |
10:21:18 | * | Vladar joined #nim |
10:26:31 | Yardanico | there's a pure-nim snappy |
10:26:37 | Yardanico | https://github.com/status-im/nim-snappy |
10:27:05 | Zevv | PMunch: well, it just such a nasty hack, Im not sure if i really dare promote it as something usable |
10:29:36 | PMunch | Well what's the alternative? |
10:31:11 | FromDiscord | <kodkuce> can i asign a tuple with 2 ints directrly from array of 2 ints? |
10:34:05 | FromDiscord | <kodkuce> sent a code paste, see https://paste.rs/PaP |
10:34:27 | Yardanico | no, just assign both fields? |
10:34:34 | FromDiscord | <kodkuce> i guess i can do↵mytuple = (p1:myarray[0], p2:myarray[1] ) |
10:34:37 | Yardanico | it's just 2 fields, no big deal |
10:34:41 | Yardanico | you don't even have to specify field names |
10:34:56 | Yardanico | and you're reassigning a tuple fully btw |
10:35:01 | Yardanico | not modifying the individual fields |
10:35:02 | FromDiscord | <kodkuce> mytuple = (myarrya[0], myarray[1]) |
10:35:04 | Yardanico | but it doesn't matter in most cases |
10:35:06 | Yardanico | yeah that'll work |
10:35:56 | Zevv | alternative is that i just make a note in the readme that the thing is a hack, and is not suitable for real use |
10:36:18 | FromDiscord | <kodkuce> ok ty |
10:38:06 | PMunch | Zevv, that should definitely be there :P |
10:38:25 | PMunch | kodkuce, you could of course also write a macro for it.. |
10:41:06 | FromDiscord | <kodkuce> i am long way from macros 🙂 and in realyti its no biggie atm i just needed at 1 place for 2 ints |
10:41:39 | FromGitter | <alehander92> macros are simple |
10:41:47 | FromGitter | <alehander92> but of course, if you can do without it's also ok |
10:47:09 | PMunch | https://play.nim-lang.org/#ix=2uNN |
10:47:12 | PMunch | Something like that |
10:47:18 | PMunch | Couldn't quite get the converter to work though.. |
10:52:58 | Yardanico | https://play.nim-lang.org/#ix=2uNQ this works |
10:53:11 | Yardanico | no variable length of course |
10:53:30 | PMunch | Well, where's the fun in that :P |
10:55:17 | PMunch | Hmm, interesting how you can do only `var tuple` there |
10:55:26 | PMunch | Err `var name: tuple` |
10:56:02 | Yardanico | yeah |
10:56:12 | Yardanico | but it works :P |
10:57:45 | PMunch | Well, yeah.. |
10:58:22 | FromDiscord | <lqdev> i feel like nim could do with a little nicer type inference |
10:58:44 | FromDiscord | <lqdev> like, inferring generic params based on the expected return type |
10:58:50 | Yardanico | oh, hindley milner type systems |
10:59:11 | Yardanico | not sure how easyt it would be to change that :P |
10:59:15 | FromDiscord | <lqdev> no, not that. |
10:59:17 | Yardanico | but rust has their own version of HM |
10:59:33 | Yardanico | and they have return type generic type inference |
10:59:49 | Yardanico | e.g. let data: u32 = str.parse() <- calls parse<u32>(str) |
10:59:53 | Yardanico | pseudo rust syntax |
11:00:13 | FromDiscord | <lqdev> just storing the expected return type of the expression, so if a proc is assigned to it, the proc can adjust its generic params accordingly |
11:00:28 | FromDiscord | <lqdev> you don't need a full hindley-milner type inference algo for that. |
11:01:43 | FromDiscord | <kodkuce> looks simple |
11:04:14 | FromGitter | <jorjun_twitter> Raspberry Pi Zero after apt-get install |
11:04:20 | FromGitter | <jorjun_twitter> Nim Compiler Version 0.19.4 [Linux: arm] ⏎ Compiled at 2019-03-05 |
11:04:32 | FromDiscord | <kodkuce> lol |
11:04:44 | FromGitter | <jorjun_twitter> the things is too puny to compile on.. |
11:05:00 | * | lritter joined #nim |
11:05:28 | FromDiscord | <kodkuce> hmm you mean it will need forwer to compile if posible on 512mb, hmm isent there a crosscompile option |
11:05:34 | FromDiscord | <kodkuce> like dev on pc run on rpi |
11:07:59 | FromGitter | <jorjun_twitter> yeaah, not crosscompiled anything yet… but would like to learn how |
11:10:46 | PMunch | It's surprisingly easy with Nim |
11:13:08 | FromDiscord | <kodkuce> https://nim-lang.org/docs/nimc.html#cross-compilation |
11:14:03 | FromDiscord | <kodkuce> nim c --cpu:arm --os:linux myproject.nim << guess this |
11:14:32 | FromGitter | <jorjun_twitter> thanks @kodkuce will try this… wows |
11:15:04 | FromGitter | <jorjun_twitter> hopefully an arm6 binary.. |
11:17:02 | PMunch | (of course you need the C compiler to cross-compile as well) |
11:18:23 | FromDiscord | <kodkuce> try maybe with -arm6 duno where is list of all possibe cpu symbols |
11:19:03 | FromDiscord | <kodkuce> Available options are: i386, m68k, alpha, powerpc, powerpc64, powerpc64el, sparc, vm, hppa, ia64, amd64, mips, mipsel, arm, arm64, js, nimvm, avr, msp430, sparc64, mips64, mips64el, riscv64, wasm32 |
11:19:33 | FromDiscord | <kodkuce> su duno hope arm wokrs cuz pi zero is for sure not arm64 |
11:19:40 | FromDiscord | <kodkuce> or at least i think |
11:22:49 | FromGitter | <jorjun_twitter> will have a bash at it, thanks both. There are instructions to make an gcc compiler with the —arch target I need, will try to match this up with nim compiler.. |
11:39:05 | kinkinkijkin | getting a sigsegv "attempt to read from nil" trying to make a small vulkan application using nimgl, at vkCreateInstance |
11:39:18 | Zevv | well, it's a bit more involved to cross compile, usually you have one specific compiler you want to target. So you might need to setup a little nim configuration to point to the proper compiler binaries |
11:39:29 | Zevv | but still, it's pretty straightforward |
11:41:04 | * | endragor quit (Remote host closed the connection) |
11:41:31 | * | endragor joined #nim |
11:43:26 | * | awe002 quit (Ping timeout: 264 seconds) |
11:46:02 | * | endragor quit (Ping timeout: 258 seconds) |
11:47:50 | * | Vladar quit (Quit: Leaving) |
11:49:11 | * | awe002 joined #nim |
11:51:49 | * | Vladar joined #nim |
11:54:11 | * | superbia joined #nim |
11:59:16 | FromDiscord | <djazz> How do I send compiler arguments to nimble test? Or do I have to make my own test task? |
11:59:35 | FromDiscord | <djazz> Basically I want to use --cc:vcc in windows github action |
11:59:49 | FromDiscord | <djazz> it defaults to gcc |
12:00:27 | FromDiscord | <Clyybber> kinkingkijkin: Somethings nil then :) |
12:02:42 | * | rockcavera joined #nim |
12:04:22 | FromDiscord | <haxscramper> How I can catch exception during macro instantiation? something like `staticTry:`. If I just put macro inside `static` block just expands before static execute. |
12:06:02 | * | supakeen quit (Quit: WeeChat 2.8) |
12:06:24 | PMunch | You can just use a normal try in a macro I think |
12:06:44 | * | supakeen joined #nim |
12:07:09 | PMunch | But if it is an error that happens in the code you make in there you also need to make a try statement |
12:08:17 | FromDiscord | <haxscramper> Yes it is possible, but I this way for each macro I want to try/catch I would need to define `regularMacro` `macroThatPrintsException` and move all implementation into `macroImplementation` |
12:10:49 | PMunch | What? |
12:13:15 | kinkinkijkin | clyybber, yes i'm trying to figure out what thing is nil |
12:13:54 | kinkinkijkin | there is o:nly one nil statement in my code and it's not just acceptible to the api but preferred in my application case |
12:14:48 | PMunch | Maybe something failed initialisation? |
12:14:59 | PMunch | Most C APIs will return nil in that case |
12:15:00 | kinkinkijkin | it is vkCreateInstance(addr crinf, nil, addr VKI), but this is part of how you initialize vulkan |
12:15:02 | Zevv | bah this is so dirty; I get this string with cflags, some of which have spaces. So i parse them all by splitting on the hyphen, but then "-x c++" is no longer valid because that *is* supposed to be passed as two arguments. |
12:15:30 | kinkinkijkin | vkCreateInstance is the first initialisation and the only read from nil in the code |
12:15:59 | * | haxscramper joined #nim |
12:16:13 | haxscramper | PMunch: https://play.nim-lang.org/#ix=2uOl |
12:16:19 | PMunch | Wait, so you're not sure if it's that line which causes the error? |
12:17:02 | kinkinkijkin | no, that line is where the error occurs but the line is just rephrased from the spec guide im reading for vulkan |
12:17:31 | kinkinkijkin | so either there's an issue in the bindings or I've screwed up horribly somewhere else |
12:17:40 | kinkinkijkin | and I'm trying to figure which it is |
12:18:23 | PMunch | haxscramper, and why can't you just put the try/except around the body in the `userDSL` macro? |
12:19:14 | PMunch | kinkinkijkin, what are your other two pointers pointing to? |
12:19:24 | PMunch | aadr crinf and addr VKI |
12:19:39 | kinkinkijkin | the VkInstanceCreateInfo and VkInstance |
12:19:57 | PMunch | And how do you instantiate those? |
12:20:30 | kinkinkijkin | former is var crinf: VkInstanceCreateInfo |
12:20:44 | kinkinkijkin | followed by the exact code from the guide translated to the bindings |
12:21:23 | PMunch | Can you share the snippet you're trying to convert and what you have now? |
12:21:25 | kinkinkijkin | VKI is var VKI: VkInstance at the top of the file, couldn't figure any other way to do it |
12:21:51 | PMunch | Hmm, that sounds reasonable |
12:22:04 | haxscramper | PMunch: because I want to put this DSL in unit tests to see if compilation error is generated as expected. I bascally want to `staticTry: <macro-call> except: Error: <print-error>` in unit tests - but it should not actually fail test compilation. I do not want to actually 'try-except in macro'. |
12:22:22 | kinkinkijkin | https://vulkan-tutorial.com/en/Drawing_a_triangle/Setup/Instance this is the guide with the code i am recreating, ill get the init code for vulkan up in a second |
12:22:42 | haxscramper | There is a `expect` in unittest for runtime errors, I'm looking for something similar but at compile-time |
12:22:51 | PMunch | Aaaah, I see haxscramper |
12:23:18 | kinkinkijkin | https://dpaste.com/9LMPB8DR8 pmunch |
12:23:30 | haxscramper | If for example I could just get compilation error from `compiles` it would be more than enough for my purposes. |
12:23:42 | PMunch | What you need is a macro that takes the macro call, does a staticTry and outputs a runtime assert false or something similar. |
12:28:51 | haxscramper | Is it possible to pass `macro1` to `macro2` and run `macro1` as callback? |
12:29:06 | PMunch | kinkinkijkin, hmm, this is indeed strange |
12:29:44 | PMunch | That looks correct, but it depends on the wrapper having the correct types defined, I'm particularly curious about those strings |
12:30:04 | kinkinkijkin | the strings are cstrings on the wrapper's side |
12:30:12 | PMunch | Oh by the way, if you use ix.io you can get syntax highlighting in Nim |
12:30:13 | kinkinkijkin | supposed to be an implicit conversion, correct? |
12:30:19 | PMunch | Yeah, that's good |
12:30:59 | kinkinkijkin | I'll keep that site in mind |
12:31:56 | FromDiscord | <djazz> in a nimscript, how do i check for the backend used? when defined(...what to put here?...) |
12:32:44 | FromDiscord | <djazz> e.g. I don't want to enable threads for a js target |
12:32:57 | PMunch | when defined(js)? |
12:33:16 | PMunch | No wait, I don't think that' it |
12:33:57 | kinkinkijkin | i should note, nimgl's vulkan bindings seem to be potentially out-of-date |
12:34:13 | PMunch | kinkinkijkin, I guess you could try to output all the fields in the crinf and the ainf and see if they make sense |
12:34:20 | kinkinkijkin | alright |
12:36:16 | kinkinkijkin | no iterator for the fields... crap, gonna have to type each manually aren't i |
12:38:00 | FromDiscord | <Rika> eh? there are field iterators, what's the error if any? |
12:40:27 | FromDiscord | <djazz> hmm, i sent in -d:js, then I can check for it |
12:42:32 | kinkinkijkin | https://dpaste.org/4mL4 pmunch this is what i got from crinf |
12:42:36 | kinkinkijkin | next onto ainf |
12:45:15 | PMunch | Wait, what's the code you're using to print? |
12:46:12 | kinkinkijkin | https://dpaste.org/nvVv |
12:46:22 | kinkinkijkin | going to paste what's from ainf now too |
12:46:45 | kinkinkijkin | https://dpaste.org/1p1x |
12:51:07 | * | endragor joined #nim |
12:51:11 | PMunch | Hmm, well all those fields look fine |
12:51:20 | PMunch | Must be something you haven't initialised I guess.. |
12:51:52 | PMunch | Try to put VKI inside that procedure just for a sec |
12:51:57 | PMunch | If you can |
12:58:07 | FromDiscord | <--HA--> Can someone recommend a library to me to work with tga images? I want to take a number of input images, rotate some of them and output a new composite image with the input images put side by side. |
12:58:50 | * | bung joined #nim |
12:59:26 | * | endragor quit (Ping timeout: 240 seconds) |
12:59:44 | FromDiscord | <Rika> ~~imagemagick~~ |
13:00:20 | * | waleee-cl joined #nim |
13:01:01 | PMunch | https://xkcd.com/2347/ (the hovertext) |
13:02:07 | FromDiscord | <Rika> yeah lol |
13:03:39 | Zevv | i'm good with imagemagick, but its not on my resume on purpose. I always impress people. |
13:03:47 | * | endragor joined #nim |
13:03:48 | Zevv | but dont tell how I did it |
13:04:51 | FromDiscord | <djazz> How do I override cppXsupport of the gcc/clang compiler? |
13:05:24 | FromDiscord | <djazz> I get this error on macOS github actions: `error: invalid argument '-std=gnu++14' not allowed with 'Objective-C'` |
13:05:45 | FromDiscord | <djazz> I want to set it to -std=c++14 or something |
13:05:59 | FromDiscord | <--HA--> Zevv have you used it with nim? |
13:06:22 | FromDiscord | <Rika> i think they made nimagemagick |
13:06:25 | FromDiscord | <Rika> lol |
13:09:13 | * | endragor quit (Ping timeout: 258 seconds) |
13:10:12 | PMunch | Zevv, you're now on my list of people to pester whenever I struggle with ImageMagick :P |
13:11:40 | FromDiscord | <djazz> Hmm, someone on github says passing -std=c++17 with passC should override it |
13:15:18 | shashlick | I was recently trying to detect blurred images with nimagemagick in autodup |
13:15:39 | FromDiscord | <djazz> ..nope, didnt work |
13:16:51 | shashlick | What does c++ have to do with obj-c |
13:18:36 | Zevv | --HA--: not at the API level i just use the cmdline |
13:19:32 | FromDiscord | <--HA--> Thanks everyone. I'll look into imagemagick and the nimagemagick wrapper both. |
13:20:25 | FromDiscord | <djazz> Hmm, maybe this isn't in stable yet... https://github.com/nim-lang/Nim/pull/13798 |
13:20:26 | disbot | ➥ fix some codegen bugs: NIM_BOOL, NIM_STATIC_ASSERT, --passc:-std=... (etc) ; snippet at 12https://play.nim-lang.org/#ix=2sly |
13:22:15 | * | endragor joined #nim |
13:24:31 | FromDiscord | <djazz> commit spam in my repo while trying to get it to build with github actions xD |
13:25:04 | FromDiscord | <djazz> removed the -x objective-c flag from passC, seems like the upstream library don't use it in their build |
13:29:25 | * | endragor quit (Ping timeout: 240 seconds) |
13:29:27 | bung | hi, how to manage bits with 1,5, or 6 bits? then concate them to string |
13:35:02 | * | moerm joined #nim |
13:35:10 | moerm | Hello everyone ;) |
13:36:01 | FromGitter | <alehander92> what do you mean bing |
13:36:03 | FromGitter | <alehander92> bung * |
13:36:12 | FromGitter | <alehander92> 5bit byte? |
13:38:45 | bung | am writing a protocol package |
13:38:57 | bung | you can see here https://dev.mysql.com/doc/internals/en/date-and-time-data-type-representation.html |
13:39:04 | bung | data package |
13:39:57 | bung | it concate 1,17,5,5,6,6 bits to a string buffer |
13:41:02 | * | awe002 quit (Ping timeout: 258 seconds) |
13:41:57 | * | awe003 joined #nim |
13:42:58 | * | vikfret joined #nim |
13:43:27 | FromDiscord | <djazz> How do I make a proc that I can pass to a C function, matching the signature `'void (*)(const char *, const char *, void *)'` ? |
13:44:05 | FromDiscord | <djazz> I tried `proc (id: cstring, req: cstring, arg: pointer)` but clang gives errors |
13:44:22 | bung | alehander92 got any idea? |
13:45:28 | moerm | djazz try 'pointer' as return type |
13:45:54 | Zevv | djazz: be more specific than just "gives errors" |
13:46:33 | moerm | or does your 'void (*)' indicate a function returning void? |
13:47:13 | FromDiscord | <djazz> It shouldn't have a return value |
13:47:48 | moerm | then provide more details about what clang complains |
13:47:58 | kinkinkijkin | pmunch yeah that did nothing |
13:49:04 | PMunch | What did nothing? |
13:49:22 | FromDiscord | <djazz> Looking at the generated C++ code: `typedef struct { N_NIMCALL_PTR(void, ClP_0) (NCSTRING seq, NCSTRING req, void* arg, void* ClE_0); void* ClE_0; } tyProc__Enx9aPRv6DbvALm1ZsdBuuA;` |
13:49:59 | FromDiscord | <djazz> `error: cannot convert ‘tyProc__Enx9aPRv6DbvALm1ZsdBuuA’ to ‘void (*)(const char*, const char*, void*)’` |
13:50:42 | moerm | djazz -> ', void* ClE_0' the last parameter |
13:51:23 | FromDiscord | <djazz> `T2_.ClP_0 = ((TM__IgnPD3avxm9aG9cogcDavIYw_9) (generalBindProc)); T2_.ClE_0 = NIM_NIL;` |
13:51:38 | FromDiscord | <djazz> and then it calls it `webview_bind((*w).w, name, T2_, ((void*) (bindArg)));` |
13:51:59 | FromDiscord | <djazz> T2_ is a struct, which is wrong... |
13:52:15 | FromDiscord | <djazz> It should pass T2_.ClP_0 I think? |
13:52:45 | FromGitter | <alehander92> sorry bung i look at it now |
13:52:51 | moerm | tell us the full and real Nim definition of your function |
13:53:24 | FromGitter | <alehander92> please try to use the right word: byte, not bit: using the wrong term can break everything |
13:53:25 | FromDiscord | <djazz> `proc generalBindProc(id: cstring, req: cstring, arg: pointer) {.exportc.}` |
13:53:42 | FromGitter | <alehander92> bung ^ byte |
13:53:46 | kinkinkijkin | pmunch putting vki in initVulkan |
13:54:00 | FromGitter | <alehander92> ah it seems that the bit part is down |
13:54:10 | FromGitter | <alehander92> sorry, my fault, your terminology was perfect |
13:54:15 | PMunch | Aaah |
13:54:17 | PMunch | Hmm |
13:54:26 | PMunch | Then I actually have no idea what's going on.. |
13:54:32 | FromGitter | <alehander92> well, you need to use bit operations bung |
13:54:32 | bung | alehander92 hmm, yeah 5bytes also right |
13:54:34 | PMunch | I guess you could try to use GDB to debug it |
13:54:40 | FromGitter | <alehander92> which give you access to certain bits |
13:55:02 | FromGitter | <alehander92> i am really not an expert: i think i failed at that at one job homework task |
13:55:20 | FromGitter | <alehander92> so it's best to just google best ways to get 1 or several bits |
13:55:24 | FromDiscord | <djazz> Hmmm I added cdecl to the callbacks and wrapper defs, now it works |
13:55:33 | FromGitter | <alehander92> usually you apply a mask , but for >1 there might be a more efficient way than |
13:55:40 | FromGitter | <alehander92> repeating the same thing for each bi |
13:55:42 | FromGitter | <alehander92> bit * |
13:55:57 | FromDiscord | <djazz> `proc webview_bind*(w: webview_t; name: cstring; fn: proc (id: cstring, req: cstring, arg: pointer) {.cdecl.}; arg: pointer) {.implwebview.}` |
13:56:11 | FromGitter | <alehander92> but in the worst case you can just write a getBit n which applies the mask and returns 1 or 0 |
13:56:14 | moerm | djazz interesting. looks like a c++/c mixup |
13:56:20 | bung | the problem is I dont know how to construct the correct type |
13:56:21 | FromGitter | <alehander92> and just apply it for all of those |
13:56:41 | FromGitter | <alehander92> yeah, actually you can use packed structs |
13:57:11 | FromGitter | <alehander92> wow maybe that was the solution of that task |
13:57:49 | FromGitter | <alehander92> sorry bit fields * |
13:58:01 | FromGitter | <alehander92> https://stackoverflow.com/questions/24933242/when-to-use-bit-fields-in-c |
13:58:35 | FromDiscord | <djazz> Now it works with gcc, but not clang: `note: candidate function not viable: no known conversion from 'void (NCSTRING, NCSTRING, void *)' (aka 'void (char *, char *, void *)') to 'void (*)(const char *, const char *, void *)' for 3rd argument` |
13:59:00 | FromDiscord | <djazz> seems like it want const char * |
13:59:01 | FromGitter | <alehander92> they seem a bit compiler implementation dependend maybe |
14:00:25 | moerm | djazz The diff is in the '(*)' |
14:02:02 | FromDiscord | <djazz> oh, hmm |
14:02:10 | bung | alehander92 oh, thanks! new thing to me. |
14:02:11 | FromDiscord | <djazz> what does that do? |
14:03:11 | FromDiscord | <djazz> pointer to a function? |
14:03:24 | FromDiscord | <djazz> can I somehow cast it to a pointer proc? |
14:04:11 | moerm | djazz the question is what makes the compiler think it should be converted to 'void (*) (...)' |
14:05:18 | FromDiscord | <djazz> because the C code in the .h file has that |
14:05:37 | moerm | generated by Nim? |
14:07:32 | FromDiscord | <djazz> No, the header I'm wrapping |
14:07:53 | FromDiscord | <djazz> `void webview_bind(webview_t w, const char *name, void (*fn)(const char *seq, const char *req, void *arg), void *arg);` |
14:10:18 | moerm | djazz ' void (*fn)' - there's your problem. your function is one thing. passing it to another function is a different thing |
14:10:49 | bung | oh there is https://nim-lang.org/docs/manual.html#implementation-specific-pragmas-bitsize-pragma |
14:10:57 | shashlick | Use c2nim or nimterop for the wrappers, even if a single proc, better to understand the result than the process |
14:11:01 | moerm | you have to normally define your function and then pass it into the other function |
14:12:41 | FromDiscord | <djazz> I used nimterop's toast to generate the wrapper initially |
14:13:49 | FromDiscord | <djazz> `proc webview_bind*(w: webview_t; name: cstring; fn: proc (seq: cstring; req: cstring; arg: pointer) {.cdecl.}; arg: pointer) {.importc, cdecl, impwebviewHdr.}` is what it generates |
14:15:15 | * | Kaivo quit (Ping timeout: 265 seconds) |
14:15:32 | moerm | Can't help there. I do it by hand |
14:15:57 | * | awe004 joined #nim |
14:16:37 | FromDiscord | <djazz> I guess one way to solve it is to use the compile pragma, and skip the header completely |
14:17:29 | * | Kaivo joined #nim |
14:17:50 | * | awe003 quit (Ping timeout: 258 seconds) |
14:18:16 | FromGitter | <genotrance> What's the issue |
14:19:09 | FromDiscord | <djazz> Can't make a proc match the header's definition void (*)(...) |
14:19:22 | FromDiscord | <djazz> aka a proc pointer |
14:20:26 | FromDiscord | <djazz> and clang is throwing an error (gcc/g++ doesnt) |
14:21:51 | shashlick | Can you share a snippet and output |
14:24:18 | moerm | He has two functions, one of which is a param to the other |
14:25:14 | FromDiscord | <djazz> my wrapper https://github.com/daniel-j/nim-webview/blob/1f29b4dde4faca8b63f80c10f579f4bf0095954a/src/webview.nim#L120 |
14:25:41 | FromDiscord | <djazz> a proc that I use as callback https://github.com/daniel-j/nim-webview/blob/1f29b4dde4faca8b63f80c10f579f4bf0095954a/src/webview.nim#L195-L200 |
14:26:05 | moerm | I'm out. Have a nice day everyone |
14:26:09 | FromDiscord | <djazz> calling the wrapped c function, passing the callback as argument https://github.com/daniel-j/nim-webview/blob/1f29b4dde4faca8b63f80c10f579f4bf0095954a/src/webview.nim#L209 |
14:26:20 | * | moerm quit (Quit: Leaving) |
14:27:45 | FromGitter | <alehander92> bung no problem |
14:28:49 | * | bung_ joined #nim |
14:28:57 | * | bung quit (Ping timeout: 258 seconds) |
14:29:10 | FromDiscord | <Kiloneie> Whats the difference between lists and sequences? I see very little documentation there. |
14:29:53 | Zevv | its (doubly) linked lists vs vectors |
14:30:24 | Zevv | the api might look the same, but they have pretty different constraints |
14:31:33 | FromDiscord | <Kiloneie> Whats the use case of lists? |
14:31:49 | Zevv | typically random inserts/deletes |
14:32:08 | Zevv | if you insert into a seq, everything afterthe insert has to be moved one spot |
14:32:09 | FromDiscord | <maiagallo> Hi everyone! I discovered Nim yesterday and I'm very intrigued by it 🙂 |
14:33:00 | Zevv | kiloneie: when you're not doing anything performance critical or your number of elemenst is small (tens of things), seqs are almost always the right thing to use |
14:33:37 | Zevv | but if you have a large number of things and you want random insertion/deletion, lists might be better |
14:33:38 | FromDiscord | <Kiloneie> Okay, will try to remember when making a big game in Nim one day |
14:33:54 | FromDiscord | <Kiloneie> Yeh, thousands of objects |
14:34:04 | Zevv | the downside is that lists are slower in general because each element is separately allocated on the heap. overhead and bad cache locality |
14:34:18 | Zevv | maiagallo: you should be :) |
14:35:49 | Zevv | so how did you discover nim |
14:36:01 | FromDiscord | <Kiloneie> @maiagallo Welcome! If you don't know much about programming or prefer video tutorials, check out my channel on YT(same name there) |
14:37:08 | FromDiscord | <maiagallo> I was looking for a good balance between something like php/js and haskell (languages I'm using right now), and in my searches I ended up on nim's website. I'm looking for something to learn for fun, but my plan is also to have a bit of an escape plan (sadly it doesn't look like nim can help me with that yet) since covid is hitting my company pretty hard |
14:39:51 | FromDiscord | <maiagallo> Thanks @Kiloneie ! I have a bit of experience programming, just not with python or system languages 🙂 |
14:40:02 | * | vicfred joined #nim |
14:40:23 | FromDiscord | <Kiloneie> probably not my videos then. |
14:42:20 | * | awe004 quit (Read error: Connection reset by peer) |
14:42:47 | FromDiscord | <djazz> using compile pragma instead of header made it compile with clang |
14:42:52 | Zevv | yeah nim is not something you put on your cv to get blind headhunter calls yet |
14:44:18 | bung_ | send a code paste https://play.nim-lang.org/#ix=2uOR it gives me `SIGSEGV: Illegal storage access. (Attempt to read from nil?)` when access str |
14:45:03 | FromDiscord | <Kiloneie> nim is on my cv xD, for no reason... |
14:45:41 | Zevv | bung: well you're kind of asking for it, arent you |
14:45:52 | FromDiscord | <maiagallo> Are there companies using it in production? |
14:45:54 | bung_ | yeah , about 3 times |
14:46:13 | bung_ | Zevv I still can't figure it out , am stupid |
14:46:14 | Zevv | maiagallo: only a handful using nim as the primary language, I think |
14:46:35 | FromDiscord | <djazz> hooray, now tests run successfully on macos |
14:46:39 | FromDiscord | <Kiloneie> if a company doesn't enforce a specific language, you can use Nim. |
14:47:00 | Zevv | bung_: str.addr points to the address of the string, but not the address of the string *payload* |
14:47:44 | Zevv | a string is a little opaque struct that has a pointer to the payload and the capacity of the string. you're overwriting that |
14:47:52 | Zevv | use s[0].addr instead |
14:49:18 | Zevv | also, are you sure a string is the right kind of thing to put binary data in |
14:50:18 | FromDiscord | <Recruit_main707> just tell them you are using c |
14:50:23 | FromDiscord | <Recruit_main707> https://tenor.com/view/feel-me-think-about-it-meme-gif-7715402 |
14:50:42 | * | awe004 joined #nim |
14:51:16 | FromDiscord | <Kiloneie> Lol... if only the outputed C code made any sense |
14:51:59 | * | bung_ quit (Ping timeout: 265 seconds) |
14:52:14 | * | bung joined #nim |
14:52:54 | shashlick | @djazz - where did you change header to compile |
14:54:37 | FromDiscord | <djazz> shashlick: https://github.com/daniel-j/nim-webview/commit/d2b8b85df76657c6a054bf0ca714069453723dd2 |
14:56:01 | shashlick | what was the actual clang error |
14:59:28 | Zevv | he won't say |
15:01:34 | FromDiscord | <Kiloneie> sequences are allocated on the heap right ? |
15:01:57 | disruptek | a heap o' seqs sounds like a good saturday night. |
15:02:58 | * | haxscramper quit (Remote host closed the connection) |
15:03:22 | disruptek | shashlick: Git2Static -- IT 👏 DOES 👏 NOT 👏 FUCKING 👏 WORK 👏 |
15:05:13 | shashlick | snip it |
15:05:33 | Yardanico | http://al6x.com/blog/2020/nim-language |
15:05:43 | Yardanico | https://www.reddit.com/r/nim/comments/idycyx/feedback_v2_after_using_nim_for_couple_of_days/ |
15:06:45 | Yardanico | "The standard library Nim documentation suggest us to generate JSON by hand with JsonNode. And we absolutelly not going to do that, nobody generates JSON by hand these days. Not good, when official docs promoting inconvenient way to do things." I'll tell him about that |
15:09:21 | shashlick | output is a worrying sign |
15:09:34 | Yardanico | "Nim has weaker compile time inspection than both Kotlin and TypeScript. And the code is lower-level. That means there could be lots of runtime errors." ehm |
15:10:07 | FromDiscord | <maiagallo> umm it seems like emacs' nim-mode is a bit shaky |
15:10:55 | FromDiscord | <Rika> Yardanico: his first post suggested that most likely most of his opinions are due to his inexperience with nim |
15:11:30 | FromDiscord | <mratsim> The "Variant object type is not safe to use" is strange, if that's true it's definitely a bug |
15:12:22 | Yardanico | it's about that some errors are runtime errors |
15:12:25 | Yardanico | when they can be compile-time errors |
15:12:59 | Yardanico | "Nim should stop inventing advanced stuff and focus on improving the basics. While it has huge potential in its current state it's unusable." but I would totally disagree with that |
15:13:21 | shashlick | you can always find problems or bugs and then label something wholesale |
15:13:22 | Yardanico | maybe TS/Kotlin people have different language tastes :) |
15:13:26 | FromDiscord | <Kiloneie> "new" proc is used when ? It makes a new traced reference object, which can be used on plain/non reference objects to make them allocated on the heap... |
15:13:26 | FromDiscord | <Rika> these arent really basic issues to fix are they not |
15:13:39 | disruptek | we're just not at the point where the ecosystem is ready to receive the uncommitted. |
15:13:57 | Yardanico | I don't understand how object vs ref object is a low-level detail |
15:14:04 | Yardanico | It's a normal thing to have in real native compiled languages |
15:14:13 | FromGitter | <alehander92> i mean the guy posted it in the subreddit |
15:14:22 | FromGitter | <alehander92> so he does look for the actual truth |
15:15:06 | FromGitter | <alehander92> it seems that those details just show a newcomer problem : maybe |
15:15:19 | FromGitter | <alehander92> there can be better examples of how compile time introspection works |
15:15:35 | FromGitter | <alehander92> i think most of them are basically "read this existing macro" |
15:15:45 | FromGitter | <alehander92> and macros .. are not the most readable codebases |
15:15:52 | FromGitter | <alehander92> (at least mine, but also some others) |
15:16:06 | * | bung quit (Ping timeout: 258 seconds) |
15:16:19 | Yardanico | https://forum.nim-lang.org/t/6707 |
15:16:21 | Yardanico | so we can discuss better |
15:16:52 | FromDiscord | <maiagallo> What would you sai is the editor with the best nim support at the moment? |
15:16:57 | FromDiscord | <maiagallo> (edit) 'sai' => 'say' |
15:17:22 | Yardanico | well, honestly |
15:17:35 | Yardanico | VSCode / NeoVim both have good support |
15:17:37 | FromDiscord | <Kiloneie> maybe Vs Code ? |
15:17:38 | Yardanico | also Sublime Text |
15:17:42 | FromDiscord | <Kiloneie> i use Vs Code |
15:17:47 | FromDiscord | <Rika> i understand the object variant point though, they must be set on construction and cannot be changed after creation so why cant the error be a compile time error? |
15:18:19 | FromDiscord | <maiagallo> thanks 🙂 |
15:20:21 | shashlick | disruptek: what's the error with git2static |
15:20:41 | * | bung joined #nim |
15:27:49 | FromDiscord | <maiagallo> Do I have to use `ref` with generics? |
15:28:08 | FromDiscord | <Recruit_main707> no |
15:28:16 | FromDiscord | <Recruit_main707> generic objects? |
15:28:45 | FromDiscord | <Rika> its pretty rare to see that |
15:28:55 | FromDiscord | <Rika> usually you only use refs or you only use generics |
15:29:14 | FromDiscord | <maiagallo> It's what they do in the generics section of the tutorial, though |
15:29:37 | FromDiscord | <lqdev> `ref` and generics are completely unrelated |
15:30:11 | FromDiscord | <lqdev> one is related to value and reference passing semantics and allocations, the other is about adding parameters to types |
15:30:25 | FromDiscord | <Rika> which tutorial? |
15:30:41 | FromDiscord | <Kiloneie> Is the "new" proc's only use case of making non-ref objects into reference objects ? |
15:30:59 | disruptek | shashlick: my bad, it's passing ci now. maybe it was a ci cache issue. |
15:31:22 | FromDiscord | <lqdev> @Kiloneie `new`'s use case is allocating ref objects. |
15:31:30 | FromDiscord | <lqdev> or, rather, ref types. |
15:32:02 | FromDiscord | <lqdev> bear in mind that `ref` does not apply to objects _only_. |
15:33:08 | FromDiscord | <maiagallo> yeah, I was just assuming that it was a requirement to work with generics |
15:33:44 | FromDiscord | <maiagallo> but I think I'm doing something else wrong, then: https://gist.github.com/dariooddenino/2a0897785ca3c690add5f707febe7252 |
15:33:55 | * | hnOsmium0001 joined #nim |
15:34:20 | * | tane joined #nim |
15:34:41 | FromDiscord | <Kiloneie> but isnnt this identical: https://play.nim-lang.org/#ix=2uP0 note the comment |
15:35:06 | FromDiscord | <maiagallo> oh nice! much better than pasting gists 😄 |
15:35:13 | FromDiscord | <Kiloneie> yes use that |
15:35:17 | disruptek | rika: object variants can be changed after creation. |
15:35:39 | FromDiscord | <lqdev> @Kiloneie yes, it *is* identical. |
15:35:59 | FromDiscord | <lqdev> `MyRef()` is sugar for `new(MyRef)`. |
15:36:08 | * | def- quit (Quit: -) |
15:36:25 | FromDiscord | <Kiloneie> okay but i can convert a normal object into ref one using new |
15:36:38 | FromDiscord | <Recruit_main707> yes iirc |
15:37:06 | FromDiscord | <Kiloneie> idk why one would do that... but you can |
15:37:15 | FromDiscord | <Recruit_main707> ref is just a garbage collected pointer |
15:37:26 | * | bung quit (Ping timeout: 240 seconds) |
15:37:27 | FromDiscord | <lqdev> @Kiloneie how so? |
15:37:39 | FromDiscord | <maiagallo> https://nim-lang.org/docs/tut2.html#generics btw I was trying to convert this example to work without mutations |
15:37:52 | * | bung joined #nim |
15:38:09 | FromDiscord | <lqdev> as i said, `ref` isn't tied to objects _specifically_ |
15:38:16 | FromDiscord | <Kiloneie> https://play.nim-lang.org/#ix=2uP2 |
15:38:17 | FromDiscord | <lqdev> you can create _any_ ref type |
15:38:38 | FromDiscord | <lqdev> so… what's the problem with that? |
15:38:46 | FromDiscord | <Kiloneie> nothing |
15:39:01 | FromDiscord | <Kiloneie> im just looking for use case of new |
15:39:17 | FromDiscord | <Kiloneie> for video... |
15:39:17 | FromDiscord | <lqdev> allocating things on the heap? |
15:39:32 | FromDiscord | <Kiloneie> i meant praactical |
15:39:43 | FromDiscord | <Kiloneie> as in example why |
15:39:43 | FromDiscord | <Recruit_main707> 🥴 |
15:39:48 | FromDiscord | <lqdev> well, there aren't _that_ many. |
15:40:00 | FromDiscord | <Kiloneie> i guess il leave it at that |
15:40:18 | FromDiscord | <lqdev> just say that `new()` is the default and using object constructors with ref objects is sugar. |
15:40:30 | disruptek | this, basically. |
15:40:41 | disruptek | `new result` is something of an idiom. |
15:40:47 | disruptek | particularly with generics. |
15:41:08 | disruptek | otherwise, you're better off not using it. |
15:41:38 | FromDiscord | <Kiloneie> you mean when making ref objects, use new instead of refObject(), because it's more clear on what it is ? |
15:41:59 | disruptek | i recommend /not/ using new. |
15:42:17 | disruptek | it's just an annoyance if you find you can switch to a value type later. |
15:42:39 | FromDiscord | <Kiloneie> okay, many mixed signals everywhere xD |
15:42:51 | disruptek | not really. |
15:43:19 | FromDiscord | <Kiloneie> gotta make sure to tell the viewers to use ref in the naming of their ref objects |
15:43:30 | FromDiscord | <lqdev> don't. |
15:43:37 | disruptek | please no. |
15:43:39 | FromDiscord | <Kiloneie> no ? not a good practice ? |
15:43:54 | FromDiscord | <lqdev> > When naming types that come in value, pointer, and reference varieties, use a regular name for the variety that is to be used the most, and add a "Obj", "Ref", or "Ptr" suffix for the other varieties. If there is no single variety that will be used the most, add the suffixes to the pointer variants only. The same applies to C/C++ wrappers. |
15:43:58 | FromDiscord | <lqdev> https://nim-lang.org/docs/nep1.html#introduction-naming-conventions |
15:44:35 | FromDiscord | <Kiloneie> oh yes |
15:44:58 | FromDiscord | <Kiloneie> well making videos on objects is a pain |
15:45:11 | FromDiscord | <Kiloneie> probably gonna explode on macros |
15:45:26 | shashlick | disruptek: bintray was having some issues yesterday |
15:45:51 | disruptek | i don't know why i try so hard with ci. |
15:46:48 | * | vikfret quit (Quit: Leaving) |
15:49:10 | FromDiscord | <maiagallo> https://play.nim-lang.org/#ix=2uP5 Ok I've made a simple case of what I was trying to do 🙂 |
15:52:50 | FromDiscord | <Rika> @maiagallo https://play.nim-lang.org/#ix=2uP7 |
15:54:35 | FromDiscord | <maiagallo> ahn, I needed the [T] in the constructor too! Thanks @Rika |
15:57:30 | FromDiscord | <maiagallo> Does this mean that I always have to use a constructor `proc`/`func`? For example directly doing a `var p3 : Person[string] = Person[string]("foo")` doesn't work |
15:58:15 | Yardanico | that's not the object construction syntax |
15:58:21 | Yardanico | var p3 = Person[string](name: "foo") |
15:59:05 | FromDiscord | <Rika> `var p3 : Person[string] = Person[string](name: "foo")` will work |
15:59:26 | FromDiscord | <Rika> you can do away with the type on the lhs too if thats your thing |
15:59:57 | * | noonien quit (Quit: Connection closed for inactivity) |
16:00:01 | FromDiscord | <Rika> object construction syntax is not a function, you need to specify field alongside the value |
16:02:11 | FromDiscord | <maiagallo> I see! Thanks a lot 🙂 |
16:03:55 | * | JustASlacker quit (Ping timeout: 240 seconds) |
16:10:20 | FromDiscord | <Hearthstone> Is Nim faster then C#? |
16:10:24 | FromDiscord | <Hearthstone> Using the C backend |
16:10:40 | FromDiscord | <Hearthstone> And how good is Nim's async? |
16:10:54 | FromDiscord | <Hearthstone> ~dimscord |
16:10:54 | disbot | no footnotes for `dimscord`. 🙁 |
16:10:58 | FromDiscord | <Hearthstone> Oof |
16:11:10 | FromDiscord | <Hearthstone> !repo dimscord |
16:11:10 | disbot | https://github.com/krisppurg/dimscord -- 9dimscord: 11A Discord Bot & REST Library for Nim. 15 31⭐ 5🍴 7& 2 more... |
16:11:35 | Yardanico | @Hearthstone "faster than" is a bad question usually |
16:11:37 | Yardanico | but "yes" |
16:11:45 | FromDiscord | <Rika> depends on the code you compare |
16:11:51 | FromDiscord | <Recruit_main707> generally, nim is faster than c#, but .net does all kind of optimizations, and it sometimes is faster |
16:11:55 | FromDiscord | <Hearthstone> Thanks :P |
16:12:02 | Yardanico | depends on the code you write of course |
16:12:10 | FromDiscord | <Rika> wdym by how good nims async is |
16:12:53 | Araq | Yardanico: I could use some help on #15122 |
16:12:55 | disruptek | it's not as good as c#'s async. |
16:12:55 | disbot | https://github.com/nim-lang/Nim/issues/15122 -- 3[ARC] Sequence "disappears" with a table inside of a table with an object variant ; snippet at 12https://play.nim-lang.org/#ix=2uPd |
16:13:48 | Yardanico | Araq: with what exactly? |
16:13:55 | Yardanico | I know it's a rather strange issue |
16:14:16 | Araq | reduce it further |
16:14:29 | Araq | toTable seems to produce weird code |
16:14:36 | Yardanico | oh okay |
16:20:57 | * | qwertfisch_ joined #nim |
16:20:59 | * | beatmox- joined #nim |
16:21:19 | * | beatmox quit (Ping timeout: 272 seconds) |
16:21:23 | * | qwertfisch quit (Read error: Connection reset by peer) |
16:22:23 | disruptek | !last clyybber |
16:22:25 | disbot | clyybber spoke in 12#nim 4 hours ago 12https://irclogs.nim-lang.org/21-08-2020.html#12:00:27 |
16:25:48 | FromDiscord | <Kiloneie> string is allocated on the heap right ? |
16:26:01 | FromDiscord | <Kiloneie> wait... probably not |
16:26:05 | FromDiscord | <Rika> yes |
16:26:15 | FromDiscord | <Kiloneie> okay thanks |
16:26:21 | Yardanico | they are except the string literals |
16:26:23 | Yardanico | which are not modified |
16:26:34 | Yardanico | these are optimized so they don't need allocations with arc on devel |
16:27:36 | FromDiscord | <Recruit_main707> why not universally instead of only in arc? |
16:28:23 | disruptek | they are constants regardless of gc. |
16:28:57 | Yardanico | disruptek: I mean in the backend |
16:29:03 | Yardanico | they're static strings with arc on devel |
16:29:12 | Yardanico | no heap allocs |
16:29:21 | disruptek | they are constants regardless of gc. |
16:29:31 | disruptek | they are static strings regardless of gc. |
16:34:18 | Yardanico | Araq: this one doesn't need toTable https://play.nim-lang.org/#ix=2uPl |
16:40:26 | Yardanico | it crashes with SIGSEGV with -d:useMalloc btw |
16:40:33 | Yardanico | ah no it doesn't |
16:40:38 | Yardanico | it's just that I used -d:danger together with it |
16:42:46 | * | vikfret joined #nim |
16:43:23 | Zevv | -d:yolo |
16:54:47 | * | arecacea1 quit (Remote host closed the connection) |
16:55:16 | * | arecacea1 joined #nim |
16:58:16 | * | superbia1 joined #nim |
17:00:49 | * | superbia quit (Ping timeout: 246 seconds) |
17:03:46 | Zevv | ping @InventorMatt |
17:04:31 | FromDiscord | <InventorMatt> Yes? |
17:04:35 | Zevv | oy |
17:04:46 | Zevv | did you happen to figure out why the arduino compile hangs? |
17:05:01 | Zevv | I have another victim. The whitespace has been fixed, but now compilation stalls |
17:06:07 | Zevv | I dont have a windows setup to test this on myself. I know nims subprocesses sometimes get hung up if theres too much output generated because pipes fill up - stupid stdlib bug, so that might be the case here as well |
17:06:49 | Zevv | https://github.com/zevv/nim-arduino/issues/2 |
17:06:51 | disbot | ➥ I cannot get this to work properly ; snippet at 12https://play.nim-lang.org/#ix=2uPC |
17:07:15 | FromDiscord | <InventorMatt> I have not been able to figure it out. I'm willing to test anything on a windows computer if you have some ideas |
17:07:46 | Zevv | hmm problemy is that i dont kno |
17:08:07 | Zevv | know how to debug these things on windows. for linux its trivial for me, but i dont know the tools available on ms |
17:08:56 | Zevv | we know the compiler is executed, and that it is basically standing still. so what is it waiting for then :/ |
17:10:02 | Zevv | ok, i'll see if i can figure this out, thanks |
17:10:22 | FromDiscord | <InventorMatt> Would there be a way to add log statements or something during that process so we can see where it gets to at least? |
17:14:53 | * | PMunch quit (Quit: leaving) |
17:15:29 | * | Jesin quit (Quit: Leaving) |
17:15:49 | Zevv | problem is that my code is not "running" at that time |
17:16:09 | Zevv | it spawns a subprocess (compiler) and is not in control until that finishes |
17:16:47 | Zevv | I expect the compiler filled the stdout/stderr pipe, ive seen that before inside the nim compiler itself. its pretty silly actually |
17:17:49 | FromDiscord | <InventorMatt> So it may be a nim compiler issue then? |
17:18:42 | Zevv | nim stdlib issue i think. i'm about to take a stroll through the woods, will look if i can see whats happening later today |
17:20:44 | * | audiofile joined #nim |
17:21:12 | FromDiscord | <dom96> > it's not as good as c#'s async.↵@disruptek[IRC]#0000 it's not? how so? |
17:25:10 | disruptek | c# has cancellation, leak-free operation, progress monitoring, and better exception handling. |
17:25:18 | disruptek | ...just to name a few differences. |
17:25:45 | * | bung quit (Ping timeout: 240 seconds) |
17:26:38 | FromDiscord | <dom96> Cancellation and progress monitoring sure, but the rest of your claims I would challenge 🙂 |
17:27:13 | FromDiscord | <dom96> And to be fair, Nim's async has a form of cancellation too: you can close the fd and operations get cancelled. Most of the time that is all you ever need. |
17:27:30 | disruptek | btdt, this is not what you want. |
17:27:31 | * | Jesin joined #nim |
17:27:53 | disruptek | how about docs? |
17:27:56 | disruptek | https://docs.microsoft.com/en-us/dotnet/standard/asynchronous-programming-patterns/task-based-asynchronous-pattern-tap |
17:30:04 | FromDiscord | <dom96> Nice, we could quite trivially implement that form of progress reporting and cancellation |
17:30:13 | disruptek | go for it. |
17:30:41 | disruptek | look, i love nim and i believe it can provide the best async. |
17:30:48 | disruptek | but async/await is not that animal. |
17:31:45 | FromDiscord | <dom96> Don't let perfect be the enemy of the good. |
17:31:53 | disruptek | not yet anyway. i await your trivial pr. |
17:32:05 | disruptek | so to speak. |
17:33:15 | * | Trustable joined #nim |
17:33:51 | FromDiscord | <Avatarfighter> What is new disruptek and dom96, nice to see both of you 🙂 |
17:33:52 | FromDiscord | <dom96> here is the thing, I have spent many month-work-hours on various things in Nim, I have reached a point where I am simply not willing to spend any more time on things unless A) they are fun B) they are a dependency on another project I am working on |
17:34:20 | disruptek | i get it. you don't want to bikeshed software that doesn't exist. neither do i. |
17:34:38 | disruptek | async/await is not as good as c#'s async. |
17:34:54 | FromDiscord | <Rika> and that's fine for now, right? |
17:35:13 | disruptek | it doesn't bother me anymore because i don't use it anymore. |
17:37:17 | FromDiscord | <dom96> > async/await is not as good as c#'s async.↵Does C#'s async/await support as many platforms as Nim's? I guess with .net core it may nowadays, but what's the support there? |
17:37:45 | FromDiscord | <Rika> net core has pretty good support nowadays afaik |
17:37:46 | FromDiscord | <dom96> There are many ways to evaluate how good something is, lack of features is one way. But there are many things about Nim that makes Nim's async better than C#'s |
17:37:56 | disruptek | it's not supported in jvm, which is the biggest oversight. but, unlikely to improve. |
17:38:16 | disruptek | almost no one uses nim, so it really doesn't matter how broad the support is. |
17:39:11 | disruptek | i mean, it's great if you use it, obviously. but it's senseless to compare when even on a single platform, c# is mopping the floor with us. |
17:39:23 | disruptek | who are you trying to convince? |
17:39:48 | * | kinkinkijkin quit (Quit: Leaving) |
17:41:05 | FromDiscord | <dom96> Why don't you just use C# then? |
17:41:15 | disruptek | me personally? |
17:45:22 | FromDiscord | <dom96> I mean, sure, and anyone else as well, but I know what you or anyone will say: because Nim has this feature that C# doesn't have. |
17:45:37 | FromDiscord | <dom96> Honestly, it really annoys me when you say things like "C# is mopping the floor with us" |
17:45:59 | FromDiscord | <dom96> How do you expect Nim to gain adoption when you're saying things like that? |
17:46:23 | disruptek | you want me to lie to prospective users? |
17:46:32 | disruptek | what does it have to do with anything? |
17:46:50 | disruptek | i came to nim because it felt like the tool i wanted to use for my domain. |
17:47:08 | disruptek | if a new user feels the same, they really aren't going to care if c# is more popular, are they? |
17:47:30 | disruptek | or would you rather trick the person that cares about such things? |
17:47:55 | * | superbia1 is now known as superbia |
17:50:05 | FromDiscord | <dom96> No, I don't expect you to lie. But I expect some positivity. You think if you go to Microsoft and ask the same about C# that they'll focus on all the negative aspects? |
17:50:45 | FromDiscord | <dom96> Most of them will lie. But some will say "Well, it works well for a lot of people, but tell me what exactly you want to do so I can give you a better answer" |
17:51:03 | disruptek | i'm not trying to annoy anyone. i can always wax poetic on nim. but let's face it, so can you. i'd rather hear positivity from you than untruths. |
17:51:27 | disruptek | spin has no place here, afaic. |
17:52:30 | FromDiscord | <dom96> I wouldn't call it spin. I would call it not being negative about things unnecessarily. |
17:53:17 | disruptek | the question was, "is nim faster than c#? and how good is its async?" |
17:53:38 | disruptek | there's nothing wrong with my answer. it's truthful, if incomplete, and i think we've fixed that last problem. |
17:54:07 | disruptek | there isn't anything anything "negative" about it. it's merely factual. |
17:54:33 | disruptek | you could argue that it's positive, since i'm stating that c#'s async is better. |
17:55:18 | disruptek | i'd say you criticism is hardly positive and mostly negative. |
17:56:46 | disruptek | i chose nim because it's fast and efficient. it's fast to write, it's fast to read. |
17:56:58 | disruptek | it runs fast in my domain, on the cloud, where async isn't a thing i care about. |
17:57:24 | Araq | you don't have to "lie", you can say "Nim's async works well enough for some, others wrote their own" |
17:57:25 | disruptek | i can write code once and (hopefully) use it inside node or c work. |
17:57:40 | FromDiscord | <dom96> Fine, maybe it's not about negativity or positivity, but rather indeed about omitting information at the expense of people adopting Nim |
17:58:13 | disruptek | look, hearthstone isn't leaving nim. and other people in this channel aren't leaving for c#, either. |
17:58:26 | disruptek | hearthstone is coding on a fucking phone, ffs. |
17:58:30 | FromDiscord | <dom96> You presumably wish people to use Nim, so answer questions in a way that are complete and thus positive for Nim. |
17:59:09 | disruptek | i'll do better. i hope you find improving async fun enough to justify the trivial pr you suggested. |
18:00:11 | disruptek | the thing is, i think nim sells itself pretty well. i just think the market has to be grown organically. |
18:00:27 | disruptek | people that want what nim offers will write software in nim. other people who want to use that software will use nim. |
18:00:42 | disruptek | we really don't have much competition, technically. |
18:01:15 | disruptek | so we'll attract technical users. eventually, even untechnical folks will have an ecosystem they can leverage. |
18:01:26 | disruptek | we just aren't there yet. too little polish, too little code. |
18:01:54 | disruptek | it's just my complete opinion. i'm working on it, too. |
18:02:04 | disruptek | i'm rewriting nimph right now. it's going great. |
18:02:24 | disruptek | i mean, i've spent the last 14 months writing nim more-or-less full time. |
18:02:48 | disruptek | regardless of how fun it was. |
18:02:55 | disruptek | and mangling is anything but fun. |
18:03:06 | Araq | speaking of which |
18:03:11 | Araq | why is it hard? |
18:03:29 | FromDiscord | <dom96> > we really don't have much competition, technically. |
18:03:32 | FromDiscord | <dom96> That is a big "technically" |
18:03:51 | disruptek | i guess i'm a bad programmer. |
18:04:29 | disruptek | when you look at the venn diagram of nim versus, say, rust or d or crystal, there isn't all that much overlap. |
18:04:36 | Araq | disruptek: well mangling looks easy though |
18:04:50 | disruptek | Araq: maybe you can tell me why it fails. |
18:05:08 | Araq | yeah, will try |
18:05:19 | disruptek | it fails just one test in stdlib cat. |
18:05:27 | disruptek | but, apparently, lots in the other cats. |
18:05:57 | disruptek | one perennial problem is that proc prototypes get written before the proc itself. which is annoying. |
18:06:41 | Araq | bootstrapping works? |
18:06:50 | disruptek | i think so, yes. |
18:07:24 | disruptek | on the plus side, the mangling itself is even sweeter than it was. |
18:10:03 | * | bung joined #nim |
18:10:15 | disruptek | the minor problem with proc and tuple types is that they are sorta like "anonymous types", so it's harder to associate them with an identifier. |
18:10:20 | Zevv | did you utf8-fake-[D[D[D[D[D[D8colonize in the end? |
18:10:28 | disruptek | nah. |
18:10:43 | Zevv | good |
18:10:47 | Araq | disruptek: well if bootstrapping works the rest is rather unimportant :-) |
18:10:59 | Araq | which test does fail? |
18:11:04 | disruptek | jsonutils |
18:11:17 | Zevv | i have a dedicated nim build of your branch around which i run whenver i need to read c code |
18:11:20 | Zevv | delight |
18:12:36 | disruptek | thanks, i agree it's nice. and i believe it might fix some pretty subtle bugs in the compiler. or at least, it refactors and cleans up some of the temp code. |
18:13:06 | disruptek | but it's a bad sign that it fails tests. |
18:13:22 | Araq | no, we have so many tests that usually something somewhere fails |
18:14:00 | disruptek | i consider mangling to be around 2/3rds of the IC changes. |
18:14:42 | * | bung quit (Ping timeout: 260 seconds) |
18:14:51 | disruptek | or at least, this PR should be around 2/3rds of the effort to merge IC. |
18:16:08 | Araq | disruptek: ok, what is the error message? |
18:17:44 | * | arecacea1 quit (Remote host closed the connection) |
18:18:46 | * | arecacea1 joined #nim |
18:19:08 | disruptek | http://ix.io/2uPV |
18:19:47 | * | a_b_m joined #nim |
18:20:41 | * | andinus is now known as t` |
18:20:50 | * | t` is now known as andinus |
18:23:26 | * | abm quit (Ping timeout: 240 seconds) |
18:23:52 | Araq | ok, does testRoundtrip_proc_tjsonutils_3 really not exist? |
18:24:56 | disruptek | it's _5 that _3 is referencing. but i don't know what that test is doing. i haven't looked at it. |
18:25:10 | Araq | read renderer.disamb please |
18:26:37 | * | qwertfisch_ is now known as qwertfisch |
18:27:25 | disruptek | well, this seems like it will need a patch. |
18:29:37 | disruptek | hmm, but why should it? this is front-end mangling. by the time the backend gets this stuff, it should be able to operate on it normally. |
18:29:59 | Araq | disamb is a very simple algorithm and in theory all it really takes |
18:30:30 | Araq | however, the "mangler" seq needs to be global (Part of ModuleGraph?) |
18:30:34 | disruptek | well, windows users are good at copy+paste. |
18:31:00 | disruptek | you can argue with me, but first you must understand the problem. |
18:31:13 | Araq | and of course for your case you want to add Types and Module info |
18:31:40 | Araq | but all else being equal, the disambiguation is based on the PSym's identity |
18:31:43 | disruptek | mangling is partly a function of scope, exports, and other details of the symbol. |
18:32:42 | Araq | exports? why? |
18:32:49 | disruptek | because exports cannot be mangled. |
18:32:57 | Araq | ah yeah |
18:33:03 | Araq | so you're talking of 'exportc' |
18:33:10 | disruptek | as an example, sure. |
18:33:21 | disruptek | but we also want foreign symbols to have their module name in them. |
18:33:33 | disruptek | whatfer legibility reasons. |
18:34:24 | disruptek | i think the logic in mangler.nim is pretty easy to read. |
18:34:42 | disruptek | but if you think you can replace it with a 5-line proc, go for it. |
18:34:48 | disruptek | i am ready to learn a thing. |
18:36:15 | disruptek | i've never seen so much interest in a pr, so i'd really like to see this get finished and merged one way or another. |
18:36:31 | Araq | no. not my point. ok well, give me please a link to your PR |
18:36:47 | disruptek | !pull author:disruptek mangling |
18:36:48 | disbot | https://github.com/nim-lang/Nim/pull/14632 -- 3porting name mangling from ic effort |
18:37:58 | disruptek | i just pushed a cpp tweak. |
18:38:44 | disruptek | it should let us use nice mangles on c when we need the workaround on cpp. |
18:41:01 | disruptek | wrt disamb() if your point is that we simple cache an integer, yes, that's what our sigConflicts table does. it appears in BProcs and BModules. |
18:41:50 | disruptek | it's a bit overloaded in that it holds integers-as-strings which represent unique symbol ids, or names, which represent an unused _### counter. |
18:42:23 | disruptek | these obviously will never collide. |
18:43:07 | Araq | my point is that ConflictsTable* = Table[string, int] |
18:43:21 | Araq | should be ConflictsTable* = Table[PSym, int] |
18:43:29 | Araq | maybe. |
18:43:43 | disruptek | it's more or less the same thing, but this way we can store more. |
18:43:55 | disruptek | also types, if we want to go that route. |
18:43:58 | Araq | you can also add a mangledName: string field to ast.PSym if it helps |
18:44:21 | disruptek | it could make the compiler faster, but other than that, it doesn't really help. |
18:44:25 | disruptek | we use loc.r for this. |
18:45:01 | disruptek | you're probably looking at my comment. see? comments work. |
18:50:40 | * | andinus quit (Quit: ERC (IRC client for Emacs 26.3)) |
18:50:44 | FromDiscord | <haxscramper> Is there any difference between `A = object {.inheritable.}` and `B {.inheritable.} = object` (pragma after object construction or before)? Both variants work and in most cases I see `B {..}` begin used, but `macros` documentation uses second one. |
18:52:01 | disruptek | one is on the type and one is on the symbol. |
18:52:28 | disruptek | i guess i don't understand the question. |
18:53:07 | FromDiscord | <haxscramper> Does using first variant vs second make any practical difference or it is just two ways to write the same thing? |
18:53:19 | disruptek | i don't know what `inheritable` does. |
18:53:54 | disruptek | oh, i see. |
18:53:57 | Zevv | its the same as 'of RootObj' |
18:54:03 | FromDiscord | <haxscramper> I'm asking about pragmas on objects in general, not `.inhertable.` in particular. |
18:54:10 | disruptek | it creates a new RootObj analogue. |
18:54:28 | disruptek | well, there's a difference in the ast. |
18:54:29 | FromDiscord | <lqdev> @haxscramper i think the former is deprecated |
18:54:48 | disruptek | i use the first form in cps. |
18:55:18 | disruptek | i added {.deprecated.} to the compiler for the second form. |
18:55:32 | disruptek | the idea is that an object field can be deprecated without deprecating the type. |
18:55:45 | disruptek | they mean different things. |
18:56:06 | disruptek | wrt inheritable, they may be handled the same way. i dunno. |
18:56:49 | disruptek | in cps, we add .cpsLift. to tell ourselves to lift the type in later rewrites. |
18:57:37 | FromDiscord | <haxscramper> Ok, so no difference in behaviour, only variations in AST and second one used less often (judging from documentation). |
18:57:58 | disruptek | i'm not saying that, but i won't argue with you because i don't know. |
18:58:22 | * | andinus joined #nim |
18:58:27 | disruptek | it's certainly not the same wrt {.deprecation.} or, for example, .cpsLift. |
18:58:48 | disruptek | Araq: isn't there pragma syntax for callsites? how do i use it in the ast? |
18:58:59 | FromGitter | <alehander92> ooooo |
18:59:01 | disruptek | i swear i've seen it before. |
18:59:27 | disruptek | maybe it's simply not supported by macros. |
18:59:28 | * | a__b__m joined #nim |
19:00:30 | disruptek | i think i saw zah use it. |
19:00:41 | disruptek | he was cackling at the time. |
19:01:34 | FromGitter | <alehander92> @dom96 this is an internal chat which is super active |
19:01:43 | FromGitter | <alehander92> you shouldn't censor people like that come on |
19:01:54 | FromGitter | <alehander92> obviously many things can be improved, nothing bad with saying that |
19:02:37 | FromGitter | <alehander92> but this can happen when people are just fair |
19:02:39 | * | a_b_m quit (Ping timeout: 258 seconds) |
19:02:58 | FromGitter | <alehander92> disruptek zah sounds as a person who would use that |
19:03:14 | FromGitter | <alehander92> otherwisee |
19:03:16 | FromGitter | <alehander92> i had cancelation |
19:03:28 | FromGitter | <alehander92> working in a patch to our async/await (but .. maybe it still had some bugs) |
19:03:44 | FromGitter | <alehander92> the chronos guys had their own older more mature implementation |
19:03:52 | FromGitter | <alehander92> so it's indeed not super hard probably to add that |
19:03:57 | disruptek | zah is a funny guy; i think he has a good sense of humor. |
19:04:16 | disruptek | cancel was added to chronos a few months ago. |
19:04:28 | FromGitter | <alehander92> i agree |
19:04:36 | FromGitter | <alehander92> yeah i followed their cancel |
19:04:45 | FromGitter | <alehander92> but he motivated me to try a little different approach |
19:04:49 | FromGitter | <alehander92> based on tokens |
19:05:04 | FromGitter | <alehander92> so it was cool, because one could cancel subgroups of stuff based on shared token |
19:05:11 | FromGitter | <alehander92> i kinda not remember all the details |
19:05:15 | disruptek | makes sense. |
19:05:39 | FromGitter | <alehander92> but i planned on RFC-ing it |
19:05:47 | FromGitter | <alehander92> but now with the possible different async |
19:05:49 | FromGitter | <alehander92> not sure |
19:05:57 | disruptek | you should get involved in cps. i think you'd get a kick out of it. |
19:06:19 | FromGitter | <alehander92> maaybee |
19:06:35 | disruptek | i dunno why you've stayed away. it's right up your alley. |
19:06:37 | FromGitter | <alehander92> but it seems as such a tunnel from the outside |
19:06:47 | disruptek | it's really not. |
19:06:47 | FromGitter | <alehander92> i felt like you reinvent half of nim |
19:06:53 | disruptek | no way, dude. |
19:07:10 | FromGitter | <alehander92> i can take a look tomorrow |
19:07:22 | disruptek | it's only macros, no compiler. |
19:07:27 | Araq | disruptek: ah right, loc.r, forgot about it :P |
19:07:35 | Araq | anyway my point stands |
19:07:44 | disruptek | Araq: well, caching the mangle would accelerate things. |
19:07:45 | FromGitter | <alehander92> i wanted to work on the parallel compiler idea |
19:07:56 | FromGitter | <alehander92> but then i started other stuff in other langs and yeah |
19:07:56 | disruptek | Araq: what is your point? |
19:08:24 | disruptek | alehander92: have you looked at dust? it started out as a compiler pass. early commits are a good example of how to do that. |
19:08:30 | * | natrys joined #nim |
19:08:34 | Araq | that the bug has to be something like |
19:08:52 | Araq | use_mangledname(s); # later on. |
19:09:07 | Araq | s.loc.r = mangledName(s) # but boom, inconsistency |
19:09:25 | disruptek | this is why we always re-mangle. |
19:09:56 | Araq | huh? re-mangling is the bug. you need to mangle and store it in s.loc.r immediately |
19:10:29 | disruptek | i'm not sure we can do that. |
19:10:31 | Araq | re-mangling can introduce different _N suffixes |
19:10:44 | disruptek | we always store in loc.r. |
19:10:51 | FromGitter | <alehander92> disruptek how to do what |
19:10:56 | disruptek | but we don't know what the mangling will produce until we mangle it. |
19:10:57 | FromGitter | <alehander92> i haven't really looked deep into it |
19:11:07 | disruptek | so we cannot check for a collision until we mangle. |
19:11:34 | disruptek | alehander92: dust fucks with your ast and attempts to recompile it after each change. |
19:11:58 | Araq | well that's how the old codegen works. it mangles, stores in s.loc.r and remembers the name |
19:12:10 | Araq | so the only source of bugs was "duplicate name X". |
19:12:15 | disruptek | alehander92: eary commits are an example of how to embed the compiler. you can use this to easily multithread the front-end. |
19:12:19 | Araq | whereas your bug is "undeclared thing X" |
19:12:47 | disruptek | you point is well taken. |
19:13:32 | FromGitter | <alehander92> disruptek yeah |
19:13:38 | FromGitter | <alehander92> i managed to use the parser |
19:13:41 | FromGitter | <alehander92> in parallel |
19:13:52 | FromGitter | <alehander92> but i wanted to manually write proof of concept for the other passes |
19:13:58 | FromGitter | <alehander92> for a small subset |
19:14:02 | disruptek | the problem with passes is that they suck. |
19:14:12 | disruptek | you don't get the full statement list that you parsed. |
19:14:18 | FromGitter | <alehander92> but now i mostly do stuff for job interviews and haskell and stuff |
19:14:25 | disruptek | well, of course. |
19:14:29 | disruptek | you're a badass now. |
19:14:33 | disruptek | too big for nim. |
19:14:43 | FromGitter | <alehander92> and wanted to write a subset-of-c compiler in haskell, to learn more my asm + optimizations |
19:14:48 | FromGitter | <alehander92> pffffff |
19:15:01 | FromGitter | <alehander92> i am not good enough to do only nim |
19:15:20 | disruptek | nim is a great language if you're unemployed. |
19:15:21 | FromGitter | <alehander92> i don't get the problem with passes |
19:15:31 | disruptek | passes only get toplevel statements as input. |
19:15:35 | FromGitter | <alehander92> i wondered about the 1m lines in second tho |
19:15:56 | disruptek | in v? or jai? |
19:15:57 | FromGitter | <alehander92> one can design a language which can actually be compied that fast |
19:16:03 | FromGitter | <alehander92> but i wondered how useful would that be |
19:16:17 | FromGitter | <alehander92> it seems caching / parallelxiation is more useful in general |
19:16:26 | FromGitter | <alehander92> why compiling 1m lines a second |
19:16:34 | FromGitter | <alehander92> if you can compile 1k lines |
19:16:37 | FromGitter | <alehander92> 90% of the time |
19:16:54 | disruptek | i don't see people here complaining of compilation speed. not ever. |
19:17:02 | FromGitter | <alehander92> disruptek well thy get trees |
19:17:07 | FromGitter | <alehander92> not sure what top level means |
19:17:13 | * | vicfred quit (Quit: Leaving) |
19:17:15 | FromGitter | <alehander92> well i did have complaints |
19:17:20 | disruptek | something unindented in your source file. |
19:17:31 | FromGitter | <alehander92> imagine if the compiler could be recompiled in 0.5 seconds |
19:17:41 | FromGitter | <alehander92> fun |
19:17:58 | disruptek | doesn't matter to me. i would sooner just have hcr on toplevel statements. |
19:18:26 | FromGitter | <alehander92> they seem related |
19:18:56 | FromGitter | <alehander92> but i still prefer getting a normal binary out |
19:19:27 | FromGitter | <alehander92> i don't see the appeal of hcr so much for not long-running apps |
19:19:30 | Zevv | i find hcr overrated and not worth the complexity |
19:19:35 | FromGitter | <alehander92> but it is quite nice for those |
19:19:46 | FromGitter | <alehander92> no, it's sometimes underrated: it would be cool to have |
19:19:55 | Zevv | i can do hcr in lua, python or whatevercode. but i hardly ever do it |
19:20:06 | Yardanico | I think HCR mostly makes sense in complex apps |
19:20:13 | Zevv | and if you realy need it, you can get a long way using shared libs |
19:20:17 | Yardanico | which are *by pure luck of course* usually written in compiled languages |
19:20:23 | Yardanico | so proper HCR is harder to do |
19:20:37 | disruptek | if you want cl-like repl, you want hcr. |
19:20:40 | FromGitter | <alehander92> but i just wanted to design somet |
19:20:44 | Zevv | if you want hcr, use it ina language that has it by design |
19:20:49 | Zevv | not glued on |
19:20:49 | FromGitter | <alehander92> that takes all those into account in the beginning |
19:20:55 | Zevv | go erlang |
19:21:02 | Zevv | oooh thats not compiled is it |
19:21:03 | disruptek | yes, well you did list lua and python. |
19:21:05 | FromGitter | <alehander92> zevv i don't really agree i use repl-s / live servrs a lot |
19:21:14 | FromGitter | <alehander92> e.g. django reloading live is quite ok |
19:21:42 | Zevv | but is it worth all the trouble. doing hcr in nim is a pain, lots of stuff are buggy, it clutters the code |
19:21:42 | FromGitter | <alehander92> it would be cool for nim backends as well |
19:22:02 | FromGitter | <alehander92> well, the user code seemed relatively clean |
19:22:16 | Zevv | and these days where everything is dockerize and microsreviced, why would you want to hot reload? |
19:22:18 | FromGitter | <alehander92> and many problems are with rtl afaik |
19:22:26 | Zevv | you just spin your new code in your new instance |
19:22:29 | FromGitter | <alehander92> i am talking about development |
19:22:37 | FromGitter | <alehander92> not about hot code pushing (?) |
19:22:43 | disruptek | Simple Reboot Everything |
19:22:47 | FromGitter | <alehander92> hot swapping |
19:23:00 | FromGitter | <alehander92> all of this is usually useful for fast cycle |
19:23:03 | FromGitter | <alehander92> while working |
19:23:09 | disruptek | Zevv: you need to watch more clojure tv. |
19:23:11 | Zevv | hm for development, maybe for apps with lots of reproducable state, like games |
19:23:26 | Zevv | disruptek: no that shit makes me want to /leave #nim |
19:23:29 | FromGitter | <alehander92> web backends, games |
19:23:45 | FromGitter | <alehander92> long running services |
19:24:09 | Zevv | Yeah, well, I who am i to question these things |
19:24:20 | Zevv | i just rant but dont produce a lot lately |
19:24:24 | FromGitter | <alehander92> me too |
19:24:33 | * | dpdp joined #nim |
19:24:40 | FromGitter | <alehander92> zevv i should work on asm backend soon |
19:24:50 | FromGitter | <alehander92> is there a good intro book on x86_64 stuff |
19:24:58 | disruptek | no. |
19:25:00 | Zevv | dont go that way man |
19:25:01 | dpdp | i built and installed nim from source, but /opt/nim/bin only shows nim, not nimble. did I do something wrong? |
19:25:11 | Zevv | you'll never ever reach c performance |
19:25:28 | Zevv | if you want to make a backend, go java or dex |
19:25:33 | FromGitter | <alehander92> zevv why |
19:25:42 | FromGitter | <alehander92> ah zevv but i am talking about a (subset of c) compiler |
19:25:56 | FromGitter | <alehander92> so it would be its own performance anyway |
19:25:58 | * | a__b__m quit (Quit: Leaving) |
19:26:07 | Zevv | because we emit straight c that gets heftily amazingly optimized by compilers grown with 40 years of smarts |
19:26:17 | FromGitter | <alehander92> ah yeah no no this is about a different thing |
19:26:27 | Zevv | if you start outputting your own flat asm, youll get flat performance |
19:26:30 | FromGitter | <alehander92> where i just learn to optimize more and stuff |
19:26:33 | Zevv | you gonna peephole that yourself? |
19:26:35 | disruptek | dpdp: it's surprising that nim would show up there. |
19:26:37 | FromGitter | <alehander92> yeah the point is to add optimization passes |
19:26:39 | disruptek | ~gitnim |
19:26:40 | disbot | gitnim: 11https://gitnim.com/ -- choosenim for choosey nimions -- disruptek |
19:26:43 | FromGitter | <alehander92> zevv yeah exactly |
19:26:45 | disruptek | dpdp: try gitnim. |
19:26:52 | FromGitter | <alehander92> this and other optimizztions |
19:27:12 | Zevv | alehander92: i dont know man. if you do that for fun, you should give it a go for sure, but if you want to bring it to the masses i think its a lost cause |
19:27:17 | dpdp | disruptek: should i even expect nimble to be built from running make inside nim-1.2.6? or is nimble another package |
19:27:23 | Zevv | theres a reason for thngs like llvm |
19:27:33 | disruptek | dpdp: make? no. you shouldn't. |
19:27:43 | disruptek | dpdp: ./koch tools # build nimble et al. |
19:28:22 | FromGitter | <alehander92> zevv noooo man |
19:28:30 | FromGitter | <alehander92> it's for learning purposes and for my cv |
19:28:32 | dpdp | well this is confusing. the tarball came with koch: ELF 32-bit LSB executable, Intel 80386 |
19:28:39 | Zevv | then you should go for it :) |
19:28:39 | dpdp | which doesnt run on my arch |
19:28:40 | FromGitter | <alehander92> do you think i am going to rival gcc and clang |
19:28:45 | dpdp | so how do i build koch? |
19:29:00 | Yardanico | nim c koch |
19:29:01 | disruptek | i strongly recommend gitnim. |
19:29:06 | Zevv | orrr you make a dex backend, so we can run on android with the fruit of your labour :) |
19:29:12 | dpdp | googling gitnim didnt find anything. got a url? |
19:29:20 | disruptek | ~gitnim |
19:29:20 | FromGitter | <alehander92> most compiler jobs want good asm / hardware background / maybe llvm knowledge |
19:29:20 | disbot | gitnim: 11https://gitnim.com/ -- choosenim for choosey nimions -- disruptek |
19:29:23 | Zevv | also, if you happen to become an android expert, I will *soo* hire you |
19:29:27 | FromGitter | <alehander92> so that's why i have to improve there |
19:29:29 | * | krux02 quit (Remote host closed the connection) |
19:29:37 | * | krux02_ joined #nim |
19:29:39 | FromGitter | <alehander92> zevv but i am compiling c |
19:29:47 | dpdp | Yardanico: that did it thx. |
19:29:51 | FromGitter | <alehander92> the nim parallel thing is a different project |
19:30:04 | Zevv | sure |
19:30:04 | FromGitter | <alehander92> i just realized what dex is |
19:30:15 | FromGitter | <alehander92> didn't some other guy wrote a dex backend |
19:30:35 | Zevv | no i dont think so, he did ndk integration stuff |
19:30:39 | FromGitter | <alehander92> (if you hire for writing dex and this kind of low level android i am game) |
19:30:48 | Zevv | hehe |
19:30:51 | FromGitter | <alehander92> haha, but otherwise i am so no idea of mobile |
19:31:05 | FromGitter | <alehander92> literally a big hole in my vision |
19:31:19 | FromGitter | <alehander92> they use stuff and have touches |
19:31:19 | Zevv | me neither. ive been doing pretty hefty androdi work over the last years, but its still a mess in my head |
19:31:31 | * | vikfret_ joined #nim |
19:31:45 | * | dpdp quit (Quit: leaving) |
19:31:50 | Zevv | we run android in containres without android knowing its containeried |
19:32:04 | * | fowl__ joined #nim |
19:32:05 | * | fowl_ quit (Ping timeout: 240 seconds) |
19:32:05 | * | fowl__ is now known as fowl_ |
19:32:32 | FromDiscord | <dom96> alehander92: censoring? Definitely not doing that. That would involve me silencing disruptek |
19:32:44 | * | vikfret quit (Read error: Connection reset by peer) |
19:33:33 | Zevv | i must say you guys do have pretty polite discussions lately |
19:33:40 | FromGitter | <alehander92> zevv fun |
19:33:47 | Zevv | nah |
19:33:54 | FromGitter | <alehander92> so android has namespaces ? |
19:33:55 | FromGitter | <alehander92> and chroot |
19:33:58 | FromGitter | <alehander92> interesting |
19:34:16 | Zevv | we threw out the namespaces as it clashes with the namespaces in the containers |
19:34:23 | Zevv | but we didnt tell android |
19:34:59 | FromGitter | <alehander92> @dom96 sorry: i meant trying to change the way people speak |
19:35:14 | FromGitter | <alehander92> you're right it's not censorhip, but i still think it's very important to be able to say |
19:35:19 | Zevv | problem is, ive been asking for an android expert for over two years. never came. and now people think im the android expert. but i have sooo no clue |
19:35:23 | FromGitter | <alehander92> guys X in Y is much better, let's improve ! |
19:35:35 | FromGitter | <alehander92> zevv ok so i am not the guy :D |
19:35:51 | Zevv | neither am i :) |
19:35:52 | FromGitter | <alehander92> would android switch to kotlin |
19:35:58 | disruptek | it's me, i'm your huckleberry. |
19:35:58 | FromDiscord | <dom96> Yes. If it was framed that way I’d be very happy. |
19:35:58 | FromGitter | <alehander92> i thought that's the direction they are going in |
19:36:02 | FromGitter | <alehander92> i mean dropping the jvm |
19:36:22 | Zevv | no, kotlin basically runs on java |
19:36:27 | FromGitter | <alehander92> dom96 well people are different, i think so much spam is written every day |
19:36:29 | Zevv | you can make android apps in kotlin |
19:36:38 | FromGitter | <alehander92> nobody would be like "i am not using nim" because one message was critical |
19:36:45 | FromDiscord | <dom96> Of course, the crux of the issue really is that me and disruptek disagree on the way forward for async. |
19:37:06 | FromDiscord | <dom96> I’m frustrated with people still waiting for the new thing when Nim 1.0 is out |
19:37:09 | FromGitter | <alehander92> dom96 yeah this would be huge bikeshedding moment |
19:37:26 | FromGitter | <alehander92> but i think experimentation (especially userland) is good |
19:38:02 | disruptek | nim-1.0 doesn't solve the problem. but the latest 1.0 release is not necessarily the last. |
19:38:02 | FromGitter | <alehander92> so it's good to encourage that |
19:38:16 | disruptek | dom96: there's still time for you to pr your async features into the 1.0 branch. |
19:39:29 | disruptek | it's always frustrating to present the community with software you feel is complete and then discover that you are in the minority on that view. |
19:41:03 | nisstyre | disruptek: also when you wrote it to solve your use-case and then people feel as if it should do something else |
19:41:30 | disruptek | same same but different. 😁 |
19:41:31 | FromGitter | <alehander92> that's why it should be exteensible |
19:41:41 | FromGitter | <alehander92> so people can add their usecase without hardcoding |
19:41:46 | FromGitter | <alehander92> it into the main concept |
19:41:59 | FromGitter | <alehander92> but not always possible to address everythin |
19:42:49 | disruptek | probably better to narrow the scope instead. |
19:43:25 | FromDiscord | <dom96> What’s frustrating is working on a project for a decade and it still being “immature” |
19:43:53 | FromGitter | <alehander92> but people shouldn't base their assesment on how many years other work |
19:44:07 | FromDiscord | <Recruit_main707> `when defined()` is checked only once at compile time right? |
19:44:48 | FromGitter | <alehander92> nim is a relatively succesful language: how many hobby languages got here, what it achieved is pretty good even now |
19:44:51 | disruptek | it's checked multiple times, in theory, if it's in a macro. |
19:45:10 | disruptek | in practice, we found that it may only be checked once. |
19:45:18 | FromDiscord | <Recruit_main707> ok |
19:45:23 | FromDiscord | <Recruit_main707> thx |
19:45:37 | disruptek | just another example of immaturity. |
19:46:06 | FromGitter | <alehander92> i think even go and rust have immature parts |
19:46:10 | FromGitter | <alehander92> it's normal |
19:46:19 | FromGitter | <alehander92> it's just "not as advanced / robust as the best" |
19:46:36 | shashlick | Fact is that we need to focus on bug fixes and issues raised by the community |
19:46:45 | FromDiscord | <dom96> Indeed |
19:46:45 | disruptek | go and rust don't reach as far as nim does, so we can hardly fault nim for not being more mature given the amount of money poured into go and rust. |
19:46:55 | shashlick | It's long boring tedious work but has to be done |
19:47:33 | FromGitter | <alehander92> shashlick you're right |
19:47:41 | FromDiscord | <Recruit_main707> > given the amount of money poured into go and rust. |
19:47:43 | FromGitter | <alehander92> but on the other hand : people working in their free time |
19:47:54 | FromDiscord | <Recruit_main707> and nim still is probably better than both |
19:48:00 | FromGitter | <alehander92> it's kinda expected that would want to work on more interesting stuff big % of it |
19:48:22 | FromGitter | <alehander92> still some balance |
19:48:34 | FromGitter | <alehander92> would be cool! |
19:49:10 | FromDiscord | <dom96> It’s understandable. Bug fixes burn people out quickly. |
19:49:35 | disruptek | compiler work burns me out quickly. i'm good for 4-5 days, maybe. |
19:50:47 | shashlick | Frankly, if you are using Nim in any capacity, at least 5% of your time is warranted in fixing issues of some sort |
19:51:04 | shashlick | Cause Nim's future depends on it |
19:51:13 | disruptek | does it? |
19:51:38 | FromDiscord | <Recruit_main707> at least in reporting them |
19:51:40 | shashlick | I will admit myself that it's annoying when issues block my progress |
19:52:21 | FromGitter | <alehander92> people are free to do whatever we can't really force % |
19:52:27 | FromGitter | <alehander92> incentives are better |
19:52:53 | FromGitter | <alehander92> i think the component owner thing was somtething like that |
19:53:03 | FromGitter | <alehander92> but i hardly look at jsgen bugs currently |
19:53:16 | FromGitter | <alehander92> so i am not sure how clear is all that |
19:54:35 | shashlick | Contribute something, bug reports are all great but that only increases the work |
19:55:14 | disruptek | it doesn't increase the work; it narrows it. |
19:55:27 | disruptek | you won't work on new features if core features don't work. |
19:56:16 | shashlick | 5000 issues aren't better than 2000 if you can't get to fixing them |
19:56:33 | disruptek | are you in favor of stalebot, then? |
19:56:52 | federico3 | 5k issues are much better than 2k issues |
19:57:46 | shashlick | Factually that's true |
19:58:04 | federico3 | even if you have time to fix only 10 |
19:58:18 | shashlick | But I'm talking about people feeling that they are doing some service by submitting issues |
19:58:25 | federico3 | they do |
19:58:39 | disruptek | even if they are dupes, i'd like to see them. |
19:58:42 | shashlick | There's no shortage of that, not that testing isn't crucial |
19:58:56 | disruptek | i have a huge shortage of issues. |
19:59:12 | federico3 | they help other users understand if they are seeing the same bug and save their time chasing the bug, which benefits the project |
19:59:32 | disruptek | they even help people that don't encounter the bug. |
19:59:50 | shashlick | I have just 20 in nimterop and they are too many |
20:00:28 | disruptek | no one said you aren't ambitious. |
20:00:53 | shashlick | I'm not saying issues are bad, I'm saying don't feel that's sufficient to make Nim better |
20:01:18 | disruptek | no, it's not. |
20:03:03 | * | JustASlacker joined #nim |
20:04:03 | disruptek | /home/adavidoff/nims/lib/pure/collections/critbits.nim(25, 14) Error: internal error: ReplaceTypeVarsN: when condition not a bool |
20:04:08 | disruptek | shashlick: what should i do? |
20:06:49 | shashlick | Check the issue tracker, if there's an issue already with a workaround, celebrate |
20:07:07 | shashlick | If no workaround, find one and update the issue |
20:07:20 | shashlick | If no issue open one and sit |
20:11:41 | * | JustASlacker quit (Ping timeout: 256 seconds) |
20:33:12 | * | natrys quit (Quit: natrys) |
20:33:42 | * | Trustable quit (Ping timeout: 265 seconds) |
20:34:05 | * | Trustable joined #nim |
20:35:15 | Zevv | because 50 issues is better than 20 |
20:36:07 | disruptek | it's a cligen bug, apparently. |
20:37:05 | FromDiscord | <Elegant Beef> oooh we're talking about stalebot! |
20:39:33 | Yardanico | oooooooooh |
20:39:52 | FromDiscord | <Elegant Beef> Indeed yard, i still dont quite grasp the closing of issues ;D |
20:41:11 | * | JustASlacker joined #nim |
20:41:18 | * | vicfred joined #nim |
20:41:21 | FromDiscord | <dom96> stalebotstalebotstalebot |
20:41:35 | Yardanico | just disable issues in the repo looooooooooool |
20:42:20 | FromDiscord | <Elegant Beef> Yard i think your `o` key is broken 😛 |
20:42:31 | Yardanico | it's nooooooot |
20:53:26 | * | opal quit (Remote host closed the connection) |
20:54:35 | * | opal joined #nim |
20:56:56 | FromDiscord | <dom96> brb hacking into github to remove all Nim issues |
20:57:37 | * | FromDiscord quit (Remote host closed the connection) |
20:57:53 | * | FromDiscord joined #nim |
21:01:54 | * | Yardanico is now known as Yardanico_ |
21:01:56 | * | Yardanico_ is now known as Yardanico |
21:08:05 | FromDiscord | <lqdev> damn no stalebot |
21:08:16 | FromDiscord | <lqdev> it only pisses people off |
21:08:31 | FromDiscord | <lqdev> i mean what are you supposed to do when stalebot sends you a message that the issue will be closed |
21:08:35 | FromDiscord | <lqdev> bumping is kind of rude |
21:08:58 | FromDiscord | <lqdev> so it may close issues that are perfectly valid and still a problem |
21:12:02 | * | JustASlacker quit (Ping timeout: 260 seconds) |
21:12:53 | shashlick | My point wasn't about stalebot - issues are great - it means the product is useful but for OSS, also contribute some time to help out beyond reporting issues |
21:13:05 | disruptek | i won't do it. |
21:13:40 | shashlick | there's no compulsion or rule, just the reality |
21:14:23 | disruptek | i'm hoping to be adopted by another sugarmomma. |
21:15:00 | FromDiscord | <dom96> > bumping is kind of rude↵In this context bumping would not be rude... since the bot already bumped the issue. |
21:15:43 | disruptek | that's the rude part. |
21:22:51 | FromDiscord | <dom96> works pretty well for all these successful programming languages 😛 |
21:23:44 | disruptek | so about that patch... if i wanted to write c# i still can. |
21:23:55 | disruptek | THIS |
21:23:56 | disruptek | IS |
21:23:57 | disruptek | NIM |
21:24:48 | FromDiscord | <dom96> Nah, it's about time I reverted to my past self and started using VB.NET again. |
21:28:59 | disruptek | hmm, a vb.net backend for nim, you say? |
21:29:07 | Yardanico | you mean an IL backend for nim |
21:30:13 | * | solitudesf quit (Ping timeout: 264 seconds) |
21:34:18 | FromGitter | <Knaque> Is there a thing for getting the longest string in an array? |
21:34:38 | FromGitter | <Knaque> /sequence |
21:34:55 | Yardanico | I think there wouldn't be anything better than a loop + max len check |
21:35:04 | Yardanico | maybe you can use some special data structure to do it more efficiently though |
21:38:03 | * | vikfret_ quit (Quit: Leaving) |
21:46:33 | FromGitter | <deech> If I'm writing a library how do I see the generated C/C++ for all the functions without creating an executable? |
21:47:19 | disruptek | nim c --app:lib |
21:47:44 | FromGitter | <deech> Thanks! |
21:47:51 | FromDiscord | <Recruit_main707> that will create a dll |
21:48:14 | FromDiscord | <Recruit_main707> `--compileOnly` exists? or its a product of my mind? |
21:48:17 | disruptek | nim c --compileOnly:on |
21:48:31 | Yardanico | @deech nim c --noLinking:on I think |
21:48:37 | Yardanico | ah right disruptek is right |
21:48:39 | FromDiscord | <dom96> lol |
21:48:39 | disruptek | either one. |
21:48:48 | FromDiscord | <dom96> anyone else with a different answer? |
21:48:56 | FromDiscord | <Recruit_main707> help 100 |
21:49:00 | FromGitter | <deech> Is there `nimble ...` equivalent? |
21:49:07 | Yardanico | ... ? |
21:49:11 | Yardanico | ph |
21:49:12 | Yardanico | oh |
21:49:19 | FromDiscord | <dom96> nimble c --compileOnly |
21:49:22 | FromDiscord | <Recruit_main707> i think you can also pass it the same flags |
21:49:23 | FromDiscord | <Recruit_main707> ye |
21:49:39 | disruptek | if you're making a lib --app:lib is probably the most useful. |
21:49:53 | FromDiscord | <dom96> is you're making a `dll` |
21:50:04 | FromDiscord | <dom96> someone could be making a lib that isn't meant to be distributed as a dll |
21:50:16 | disruptek | --app:staticlib |
21:50:36 | FromDiscord | <Recruit_main707> :smart: |
21:51:26 | FromGitter | <deech> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5f4041de5580fa092b1590ff] |
21:52:03 | FromDiscord | <Recruit_main707> that error is in your code very likely |
21:52:18 | disruptek | he's using nimble like it's still 2012. |
21:52:26 | disruptek | can't say i blame him; 2020 sucks the big donkey dick. |
21:52:34 | FromGitter | <deech> Haha, I'll get around to nimph. |
21:52:39 | FromDiscord | <dom96> > that error is in your code very likely↵don't think so |
21:52:52 | FromDiscord | <dom96> does `nimble c --compileOnly` work? |
21:53:08 | FromGitter | <deech> Same |
21:53:14 | disruptek | you should wait on nimph. it's diverging in a big way the moment. maybe you won't like what it becomes. |
21:53:17 | FromDiscord | <dom96> `nimble -v`? |
21:53:54 | FromGitter | <deech> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5f404271ddc2d041c0bb4d6a] |
21:54:43 | FromGitter | <deech> disruptek, what are you planning? |
21:54:56 | silvernode[m] | Does anyone know of a comprehensive page I can go to and learn how to write a website with nim? |
21:55:15 | FromDiscord | <dom96> deech: works for me on 0.11.0 |
21:55:23 | FromGitter | <deech> hrm ... |
21:55:28 | silvernode[m] | trying to figure out how to use the javascript feature in nim and use it to make a webpage. |
21:55:36 | FromDiscord | <dom96> shashlick: possible regression? ^ |
21:56:31 | disruptek | deech: it's losing the nimble requirement and becoming even more agnostic. |
21:57:27 | FromDiscord | <dom96> Can't wait for nimph 3.0, I hear it won't even require Nim anymore. |
21:57:38 | disruptek | sounds amazing. |
21:57:55 | disruptek | i mean, nimph already doesn't require nim. |
21:57:56 | FromGitter | <deech> disruptek, that does sound pretty divergent to put it mildly. |
21:59:37 | disruptek | it just uses submodules now, so it's super fast. no nimscript, no subprocesses. |
22:01:14 | disruptek | shallow repositories should be arriving this year. |
22:09:09 | * | FromDiscord quit (Remote host closed the connection) |
22:09:24 | disruptek | ah nimph requires nim for choosenim support. welp, one more thing to rip out. |
22:09:25 | * | FromDiscord joined #nim |
22:09:52 | * | Trustable quit (Remote host closed the connection) |
22:15:42 | FromDiscord | <dom96> argh, it sucks that we have no streams for sockets https://github.com/nim-lang/irc/pull/20 |
22:15:43 | disbot | ➥ Added TOR support |
22:16:09 | * | Vladar quit (Quit: Leaving) |
22:16:33 | * | lritter quit (Quit: Leaving) |
22:19:17 | FromDiscord | <dom96> or rather that Nim's standard library avoids interfaces like the plague |
22:20:35 | shashlick | deech - i don't see the issue with latest nimble cc dom96 |
22:20:58 | shashlick | are you using nim devel |
22:22:28 | * | JustASlacker joined #nim |
22:23:11 | * | thomasross joined #nim |
22:24:57 | shashlick | I fixed this recently - https://github.com/nim-lang/nimble/issues/818 |
22:24:59 | disbot | ➥ `nimble doc` failed with UnpackError ; snippet at 12https://play.nim-lang.org/#ix=2uR2 |
22:28:01 | * | Zectbumo joined #nim |
22:33:14 | FromDiscord | <Varriount> @dom96 The stdlib definitely needs more interfaces |
22:35:09 | FromDiscord | <Varriount> Though, ideally it would be possible to have interface be a compile time concept as much as a runtime one (that is, devirtualization would be predictable and excellent) |
22:36:33 | FromGitter | <deech> Why does nimble ignore env vars? eg. in `INCLUDE_PATH=a/b/c nimble cpp ...`, `a/b/c` is not searched for headers. |
22:37:23 | FromDiscord | <dom96> I don't think that's Nimble |
22:37:48 | FromGitter | <deech> Is it that it kicks off a process that doesn't have the current env? |
22:38:13 | shashlick | what do you expect to use INCLUDE_PATH |
22:38:39 | FromDiscord | <Varriount> @dom96 For example, a `proc addAll(s: seq[IAddable]): IAddable` would work on both `seq[IAddable]` and `seq[int]`, without requiring that `seq[int]` be converted. |
22:38:59 | FromGitter | <deech> Writing C bindings, I expect `{.headers: ... .}` to look there. |
22:40:19 | disruptek | i think we should copy the env. |
22:40:21 | shashlick | nimble => nim => gcc |
22:40:26 | FromDiscord | <dom96> deech: don't think so, the env should be copied. |
22:40:28 | FromDiscord | <Varriount> deech: Not if you're using a dynlib |
22:40:49 | shashlick | unless gcc looks at INCLUDE_DIR, i don't know if it idoes |
22:41:44 | FromGitter | <deech> Also tried with C_INCLUDE_PATH |
22:42:07 | FromDiscord | <Varriount> What about CFLAGS? |
22:42:12 | disruptek | CFLAGS="-I/some/path" could be expected to work. |
22:42:15 | shashlick | use --passC if you want to pass something to gcc |
22:42:20 | disruptek | i wonder if the env is even being copied, though. |
22:42:41 | shashlick | but CFLAGS might not be used by gcc by default, usually make forwards it right |
22:43:15 | FromDiscord | <Varriount> No, I've used it without make |
22:43:28 | shashlick | env is copied |
22:43:29 | disruptek | yeah, it's not a make thing. |
22:43:33 | shashlick | okay cool |
22:43:43 | disruptek | deech: CFLAGS should work, then. |
22:43:48 | shashlick | nimble uses execCmd and execCmdEx |
22:44:28 | disruptek | when you stuff the NIMBLEDIR, that doesn't replace the env, right? it's additive? |
22:44:52 | shashlick | i just use putEnv |
22:44:55 | shashlick | shouldn't affect other things |
22:45:11 | disruptek | okay. |
22:45:13 | FromDiscord | <dom96> It astounds me how dumb CI systems are. Failure because you can't connect to GitHub? wtf |
22:54:45 | * | JustASlacker quit (Ping timeout: 240 seconds) |
22:55:21 | * | tane quit (Quit: Leaving) |
22:59:19 | FromDiscord | <Elegant Beef> I mean my unity build system relies on git repos, so if github went down it wouldnt work 😄 |
23:03:13 | shashlick | It's not just github, you could have issues with the host network itself |
23:04:24 | FromDiscord | <Momiyama> sent a code paste, see https://play.nim-lang.org/#ix=2uRb |
23:08:27 | * | JustASlacker joined #nim |
23:13:58 | federico3 | dom96: is this still valid against master? https://github.com/nim-lang/nimble/pull/459 |
23:13:58 | disbot | ➥ Add SSL certificate check handling |
23:16:37 | shashlick | Doesn't show any merge conflicts |
23:18:12 | disruptek | shashlick: quick question; if you cannot answer quickly, i'll look it up: |
23:18:25 | disruptek | what constitutes a valid package name in a requires "..." statement? |
23:19:39 | disruptek | i would want to be able to determine if package names are equal or invalid, for example. |
23:21:23 | shashlick | https://github.com/nim-lang/nimble#dependencies |
23:22:15 | disruptek | right, so there are no limits on the names. |
23:22:25 | disruptek | names can have spaces, hyphens, any characters. |
23:22:26 | shashlick | i think you can also just do `requires "abc"` , not sure though |
23:22:37 | shashlick | urls work too |
23:22:43 | shashlick | but i don't think spaces will work |
23:22:44 | FromDiscord | <dom96> there are limits |
23:23:11 | FromDiscord | <dom96> it needs to be a valid Nim identifier |
23:23:18 | FromDiscord | <dom96> so no hyphens |
23:23:42 | disruptek | are package names compared style-free, etc? |
23:23:49 | shashlick | https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/version.nim#L216 |
23:23:51 | FromDiscord | <dom96> yeah, they should be |
23:24:00 | disruptek | https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/packageparser.nim#L55 |
23:24:27 | disruptek | it would be ideal if we could make them valid-nim-identifier-only but i have my doubts that this is the current ruleset. |
23:25:24 | disruptek | but that's what the comments say, so that's what i'll go with. that's great. thanks, guys. |
23:25:40 | FromDiscord | <dom96> You've got the code, you can see the rules precisely |
23:26:26 | disruptek | "" is a valid name according to the code, but... w/e. |
23:27:45 | FromDiscord | <dom96> of course, that's my favourite package |
23:27:47 | FromGitter | <gogolxdong> https://jobs.lever.co/protocol |
23:27:52 | disruptek | lol |
23:28:06 | disruptek | !repo "" |
23:28:07 | disbot | https://github.com/nim-lang/Nim -- 9Nim: 11Nim is a compiled, garbage-collected systems programming language with a design that focuses on efficiency, expressiveness, and elegance (in that order of priority). 15 9843⭐ 1051🍴 7& 29 more... |
23:28:14 | disruptek | it's a good one. |
23:28:20 | disruptek | i use it all the time. |
23:30:27 | FromGitter | <gogolxdong> Job list of protocol libs , any insterest to join? |
23:32:04 | FromGitter | <gogolxdong> labs, sorry. |
23:34:58 | FromGitter | <gogolxdong> It would be great someone using Nim to join. |
23:35:43 | disruptek | i've submitted my resume in the past for, like, tech writing roles, and didn't even get a reply. so i'm unlikely to pursue a technical role. |
23:37:39 | FromGitter | <gogolxdong> that's sad. |
23:38:26 | disruptek | probably for the best. |
23:40:40 | FromGitter | <gogolxdong> You are one of the best. |
23:40:55 | disruptek | i'm dangerous. |
23:41:45 | disruptek | i /just now/ tracked down cmpIgnoreStyle. |
23:41:52 | disruptek | that's how little i give a fuck. |
23:42:07 | * | krux02__ joined #nim |
23:42:47 | * | krux02__ is now known as krux02 |
23:44:48 | * | krux02_ quit (Ping timeout: 260 seconds) |
23:44:53 | FromGitter | <gogolxdong> :) |
23:48:09 | shashlick | It's Friday, time to chill |
23:48:26 | shashlick | Local deps is merged into nimble |
23:48:33 | disruptek | you earned it this week. |
23:54:17 | * | awe004 quit (Ping timeout: 265 seconds) |