00:07:16 | shashlick | @tomck so it works? |
00:07:29 | FromDiscord | <tomck> it works without wrapping in the bar() proc, yes |
00:08:06 | shashlick | Cool, let me know if you have any feedback on nimterop |
00:09:27 | FromDiscord | <tomck> I have no idea wtf it's doing but it seems to work with minimal code |
00:11:21 | FromDiscord | <tomck> stuff like the header file fetching is a bit wacky to me, but it does seem to work - i like that it just figures out that it can build with cmake too, that's neat |
00:15:32 | shashlick | No compulsion to use that feature, I just found it useful to make cross platform wrappers |
00:16:01 | shashlick | Any particular things that threw you off that could do with better info |
00:18:05 | * | Zevv quit (Ping timeout: 240 seconds) |
00:22:19 | * | canen joined #nim |
00:22:39 | FromDiscord | <tomck> sent a long message, see http://ix.io/2wTA |
00:29:39 | shashlick | I had added some code to check on outdir |
00:29:48 | shashlick | Let me check on that again |
00:29:56 | FromDiscord | <tomck> oh i mnight be working on an outdated version |
00:30:54 | * | kinkinkijkin quit (Read error: Connection reset by peer) |
00:31:18 | * | kinkinkijkin joined #nim |
00:45:08 | shashlick | the code was added mid June |
00:53:47 | * | dddddd quit (Ping timeout: 240 seconds) |
01:08:08 | * | endragor joined #nim |
01:19:25 | * | endragor quit (Ping timeout: 240 seconds) |
01:24:55 | * | dddddd joined #nim |
01:25:44 | * | konkrrrrrr joined #nim |
01:28:25 | * | kinkinkijkin quit (Ping timeout: 264 seconds) |
01:39:00 | * | maier joined #nim |
01:44:09 | * | apahl quit (Ping timeout: 272 seconds) |
01:44:14 | * | maier quit (Ping timeout: 258 seconds) |
01:45:28 | * | apahl joined #nim |
01:50:36 | * | vicfred_ joined #nim |
01:52:58 | * | vicfred quit (Ping timeout: 260 seconds) |
01:56:32 | * | konkrrrrrr is now known as kinkinkijkin |
01:57:09 | * | Tanger joined #nim |
02:12:47 | * | revere quit (Quit: quit) |
02:12:58 | * | revere joined #nim |
02:25:30 | FromDiscord | <Elegant Beef> Using gdb through vscode im getting some variables as optimized out, is there a way to stop that from happening? |
02:25:44 | diprustek | use nvim like a normal person. |
02:26:15 | FromDiscord | <Elegant Beef> You mean "rtfm div operator" |
02:26:32 | diprustek | it helps, you should try it. |
02:27:22 | FromDiscord | <Elegant Beef> send me your nvimconf so i can be cool |
02:27:42 | Prestige | diprustek: have you configured nim with vimspector? curious how well it works |
02:27:44 | diprustek | sure, shoot me your mailing address. |
02:27:49 | diprustek | Prestige: nope. |
02:27:53 | Prestige | ah |
02:28:21 | FromDiscord | <Elegant Beef> t4n gfu |
02:30:34 | FromDiscord | <Elegant Beef> Know diprustek he wants my actual shipping address so he can ship the config printed in an non OCRable method |
02:30:56 | diprustek | well, i want to practice my calligraphy. |
02:31:07 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
02:31:23 | FromDiscord | <Elegant Beef> "Wait you're not a doctor, based off your writing you should be" is probably what would happen |
02:33:31 | FromDiscord | <iWonderAboutTuatara> Ok, so quick opinion poll |
02:33:35 | FromDiscord | <Elegant Beef> No |
02:33:37 | FromDiscord | <iWonderAboutTuatara> for a simple mobile game |
02:33:46 | FromDiscord | <Elegant Beef> Ye i stand with what i said, no |
02:33:49 | FromDiscord | <iWonderAboutTuatara> do I use flutter, Kotlin and Swift, or something else |
02:33:57 | FromDiscord | <iWonderAboutTuatara> I'll be sure to take that into consideration |
02:34:15 | FromDiscord | <Elegant Beef> Fidget |
02:34:23 | FromDiscord | <iWonderAboutTuatara> Never heard of it |
02:34:24 | FromDiscord | <iWonderAboutTuatara> Nim? |
02:34:26 | FromDiscord | <Elegant Beef> Yes |
02:34:35 | diprustek | !repo fidget |
02:34:36 | disbot | https://github.com/treeform/fidget -- 9fidget: 11Figma based UI library for nim, with HTML and OpenGL backends. 15 292⭐ 10🍴 7& 1 more... |
02:34:47 | FromDiscord | <iWonderAboutTuatara> amazing |
02:34:52 | FromDiscord | <iWonderAboutTuatara> docs? |
02:35:00 | FromDiscord | <iWonderAboutTuatara> the more nim the better |
02:35:05 | diprustek | i've been known to play doctor, yes. |
02:35:22 | FromDiscord | <Elegant Beef> It's rather simple to use, there are examples, no docs as it is still "In development" |
02:35:29 | * | Tanger quit (Remote host closed the connection) |
02:35:30 | FromDiscord | <iWonderAboutTuatara> oh wait I have to draw everything manually? |
02:35:49 | FromDiscord | <iWonderAboutTuatara> Yes, doctors are super important @diprustek |
02:35:57 | FromDiscord | <iWonderAboutTuatara> I commend you |
02:35:58 | FromDiscord | <Elegant Beef> I mean you can also use Nico, but im not going to suggest anything outside of nim 😄 |
02:36:05 | FromDiscord | <iWonderAboutTuatara> lmao fair enough |
02:36:13 | FromDiscord | <iWonderAboutTuatara> The more nim the better |
02:36:34 | FromDiscord | <iWonderAboutTuatara> https://media.discordapp.net/attachments/371759389889003532/753081383563296828/unknown.png |
02:36:38 | FromDiscord | <iWonderAboutTuatara> lmao |
02:37:03 | FromDiscord | <iWonderAboutTuatara> looks fairly straightforward, but no docs |
02:37:47 | FromDiscord | <Elegant Beef> I mean it has doc comments |
02:38:16 | FromDiscord | <Elegant Beef> You build your own components, so you just need to know how to use each thing independantly |
02:39:15 | * | endragor joined #nim |
02:41:22 | * | oculuxe quit (Ping timeout: 256 seconds) |
02:44:01 | * | kinkinkijkin quit (Read error: Connection reset by peer) |
02:44:43 | * | kinkinkijkin joined #nim |
02:45:14 | * | oculux joined #nim |
02:49:47 | * | endragor quit (Ping timeout: 258 seconds) |
02:50:27 | * | muffindrake quit (Ping timeout: 246 seconds) |
02:52:49 | * | muffindrake joined #nim |
02:56:06 | * | Tanger joined #nim |
03:00:24 | * | canen quit (Remote host closed the connection) |
03:04:35 | * | oculuxe joined #nim |
03:05:53 | * | oculux quit (Ping timeout: 260 seconds) |
03:08:50 | * | FromDiscord quit (Remote host closed the connection) |
03:09:04 | * | FromDiscord joined #nim |
03:09:05 | * | oculuxe quit (Ping timeout: 240 seconds) |
03:11:59 | * | oculux joined #nim |
03:39:56 | * | maier joined #nim |
03:44:20 | * | endragor joined #nim |
03:45:02 | * | maier quit (Ping timeout: 265 seconds) |
03:57:56 | * | Jesin quit (Ping timeout: 258 seconds) |
03:58:55 | * | vicfred_ quit (Quit: Leaving) |
04:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
04:06:32 | * | supakeen joined #nim |
04:13:29 | silvernode[m] | so I asked for help adding items to a seq last night before work. My proc parameters were not mutable and I had to add var. Now that I have added to the seq, nim is complaining that there is an unhandled exception because the length of the seq changed and I don't know how to handle that. |
04:13:33 | silvernode[m] | Error: unhandled exception: /home/mollusk/.choosenim/toolchains/nim-1.2.6/lib/system/iterators.nim(122, 11) `len(a) == L` the length of the seq changed while iterating over it [AssertionError] |
04:15:20 | silvernode[m] | https://play.nim-lang.org/#ix=2wUg |
04:18:52 | silvernode[m] | brb |
04:26:32 | FromDiscord | <Elegant Beef> You cannot iterate over a sequence and change it, also you just want to add the item then iterate i assume to echo all entities |
04:31:23 | silvernode[m] | <FromDiscord "<Elegant Beef> You cannot iterat"> that makes sense, I guess even after years of programming on and off, I still have yet to wrap my head around logic of various concepts. I should add the item outside the loop and then only use the loop to print the contents of the seq, not to add stuff. |
04:34:35 | FromDiscord | <Elegant Beef> Yea plus you can just `echo seq` |
04:34:57 | FromDiscord | <Elegant Beef> if the objects are non references it'll output `@[valueA,valueB]` and so on |
04:36:03 | silvernode[m] | <FromDiscord "<Elegant Beef> if the objects ar"> I haven't really understood how and why to use references of objects. It seems to be something people use a lot though. |
04:47:22 | * | apahl quit (Ping timeout: 244 seconds) |
04:49:42 | * | apahl joined #nim |
04:58:52 | * | NimBot joined #nim |
04:59:02 | * | FromDiscord joined #nim |
04:59:18 | FromDiscord | <Elegant Beef> References are for when you want to have a managed pointer, typically when you do more OOP |
04:59:33 | FromDiscord | <Elegant Beef> it's as simple as `ref object` |
05:17:52 | * | narimiran joined #nim |
05:24:44 | * | vicfred joined #nim |
05:30:17 | * | Zevv joined #nim |
05:30:18 | * | Zevv quit (Changing host) |
05:30:18 | * | Zevv joined #nim |
05:40:46 | * | maier joined #nim |
05:43:19 | * | solitudesf joined #nim |
05:45:46 | * | maier quit (Ping timeout: 256 seconds) |
05:52:14 | * | Zectbumo joined #nim |
05:53:41 | voltist | Woah haven't been on here for a while. How's everyone doing? |
05:56:54 | * | Jesin joined #nim |
06:05:13 | * | maier joined #nim |
06:08:15 | * | oculux quit (Quit: blah) |
06:09:15 | * | letto quit (Quit: Konversation terminated!) |
06:12:04 | * | letto joined #nim |
06:13:00 | FromDiscord | <Elegant Beef> Im fine, you? |
06:13:32 | * | oculux joined #nim |
06:21:38 | * | oculuxe joined #nim |
06:22:09 | * | oculux quit (Ping timeout: 258 seconds) |
06:24:37 | * | arecacea1 quit (Remote host closed the connection) |
06:24:56 | * | arecacea1 joined #nim |
06:32:02 | voltist | Pretty good |
06:36:26 | PMunch | Oh hi voltist :) |
06:45:34 | voltist | Yo |
06:45:42 | PMunch | Huh, hen did the forums get categories? |
06:46:19 | narimiran | PMunch: lol, maybe 10 days ago or so |
06:46:19 | voltist | Yay, my star extraction algorithm written in Nim works well https://github.com/dizzyliam/randomImgs/blob/master/out.png |
06:47:14 | PMunch | voltist, oh is it trying to extract the position of stars from a photo? |
06:48:00 | voltist | Currently it's just trying to get positions of possible stars in a photo so that the images can be lined up |
06:48:17 | FromDiscord | <Elegant Beef> Are you using cpu or gpu? |
06:49:25 | voltist | Cpu for now, but its pretty fast. I haven't measured it yet, but it feels about as fast as some other tools |
06:49:37 | voltist | That are 'established' |
06:52:33 | * | krux02 joined #nim |
06:56:50 | voltist | Is making arraymancer stuff work on the gpu particularly difficult? |
07:00:59 | Zevv | voltist: how do you plan to handle partial overlaps |
07:02:01 | Zevv | by going to 1 bpp you drop some essential info there |
07:03:45 | Zevv | http://zevv.nl/div/t.jpg |
07:04:08 | voltist | Zevv: Yeah I could try to consider the shape of the blobs to pick out stars, but I don't think it would ever be worth the performance loss. Detecting two stars as one doesn't hinder the algorithms that align images as long as the overlap remains constant |
07:04:16 | Zevv | well, for aligning that doesn't really matter I guess, right |
07:04:19 | Zevv | true |
07:04:47 | Zevv | and being blazingly fast is proably a big pro here |
07:05:01 | * | shirleyq1 joined #nim |
07:05:17 | voltist | Existing global solving algorithms for finding where the telescope was pointed when the image was taken seem to not mind overlap either |
07:05:39 | * | shirleyquirk quit (Ping timeout: 260 seconds) |
07:05:53 | FromDiscord | <Elegant Beef> Well it'd be costly but to get more accurate positions you could colour it based of distance from the edge, so that based off SDF rules you'd clearly be able to find the epicenter 😄 |
07:06:15 | FromDiscord | <Elegant Beef> But that'd require you known the average blob size i guess 😄 |
07:07:19 | * | shirleyquirk joined #nim |
07:07:45 | voltist | Idk if that would work with my algorithm either, since it's performance is a product of being pretty cheat-y |
07:09:49 | * | shirleyq1 quit (Ping timeout: 264 seconds) |
07:11:29 | * | shirleyq1 joined #nim |
07:12:13 | * | shirleyquirk quit (Ping timeout: 264 seconds) |
07:12:53 | * | shirleyquirk joined #nim |
07:15:47 | * | shirleyq1 quit (Ping timeout: 240 seconds) |
07:15:51 | voltist | Any steps that can be taken to track down the source of a `SIGSEGV: Illegal storage access. (Attempt to read from nil?)`, since no line number is given? |
07:16:14 | Araq | run it in gdb |
07:18:01 | voltist | Araq: Will do, thanks |
07:18:23 | * | shirleyq1 joined #nim |
07:19:36 | PMunch | My signature from yesterday has gotten worse.. `iterator entries*(table: TerminalTable, sizes: seq[int]): tuple[key: int, val: iterator(): tuple[key: int, val: iterator(): tuple[key: int, val: string]]]` |
07:19:40 | * | shirleyquirk quit (Ping timeout: 256 seconds) |
07:19:42 | FromDiscord | <Recruit_main707> nice, i managed to make that glad thing work, i needed to do:↵`this.window.makeContextCurrent()` before trying to load opengl |
07:20:50 | * | shirleyquirk joined #nim |
07:22:45 | * | shirleyq2 joined #nim |
07:23:31 | * | shirleyq1 quit (Ping timeout: 246 seconds) |
07:25:58 | * | shirleyquirk quit (Ping timeout: 246 seconds) |
07:26:30 | * | shirleyquirk joined #nim |
07:29:18 | * | shirleyq2 quit (Ping timeout: 265 seconds) |
07:30:02 | * | shirleyq1 joined #nim |
07:32:42 | * | shirleyq2 joined #nim |
07:33:10 | * | shirleyquirk quit (Ping timeout: 265 seconds) |
07:34:37 | * | shirleyq1 quit (Ping timeout: 265 seconds) |
07:37:19 | * | shirleyquirk joined #nim |
07:37:23 | * | vicfred quit (Quit: Leaving) |
07:40:25 | * | shirleyq2 quit (Ping timeout: 264 seconds) |
07:43:00 | FromDiscord | <Ricky Spanish> how do i set a project to use a nimble package hosted on an alternative git source? |
07:43:14 | FromDiscord | <Elegant Beef> `require "url"` afaik |
07:43:22 | FromDiscord | <Ricky Spanish> thanks! |
07:43:34 | FromDiscord | <Elegant Beef> In the nimble file of course |
07:44:06 | * | kinkinkijkin quit (Read error: Connection reset by peer) |
07:44:41 | * | kinkinkijkin joined #nim |
07:44:59 | FromDiscord | <Ricky Spanish> yeh just found it by searching the page for what u said ```requires "https://github.com/user/pkg#5a54b5e"``` |
07:45:13 | FromDiscord | <Ricky Spanish> thanks again |
07:50:06 | * | arecacea1 quit (Remote host closed the connection) |
07:50:34 | * | arecacea1 joined #nim |
07:55:55 | * | jwm224 quit (Ping timeout: 272 seconds) |
07:57:45 | * | jwm224 joined #nim |
07:59:33 | FromDiscord | <Ricky Spanish> when using nimterop with nimble do i need to provide any more nimble build flags to force it to download the specified -d:headerDL or should nimble handle that automaticlaly? |
08:02:05 | * | shirleyq1 joined #nim |
08:05:10 | * | shirleyquirk quit (Ping timeout: 256 seconds) |
08:07:15 | * | shirleyquirk joined #nim |
08:09:25 | * | shirleyq1 quit (Ping timeout: 240 seconds) |
08:11:55 | * | shirleyq1 joined #nim |
08:13:23 | * | shirleyq2 joined #nim |
08:14:41 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=2wVc |
08:14:48 | * | shirleyquirk quit (Ping timeout: 256 seconds) |
08:15:08 | Araq | there is system.fieldPairs |
08:15:23 | FromDiscord | <tomck> Does that recurse? |
08:15:27 | Araq | for even more complex walking you need to use macros and macro.getType |
08:15:53 | Araq | of course it doesn't recurse, that's a complex thing to do |
08:16:22 | Araq | btw your Expr takes an infinite amount of memory |
08:16:25 | * | shirleyq1 quit (Ping timeout: 264 seconds) |
08:16:38 | FromDiscord | <tomck> ref Expr* |
08:16:46 | FromDiscord | <tomck> alright ta, i'll take a look into writing a macro |
08:17:14 | Araq | you should avoid that until you're sure you need it |
08:17:47 | FromDiscord | <tomck> why, am i going to run into many issues? |
08:18:05 | Araq | yes. |
08:18:22 | FromDiscord | <Recruit_main707> macros arent very easy, at least at first |
08:18:35 | Araq | even if the macro itself is fine, it won't help you all that much |
08:19:01 | FromDiscord | <tomck> how come? |
08:19:09 | Araq | tree traversals tend to be ad-hoc and tied to the problem at hand |
08:19:11 | FromDiscord | <iWonderAboutTuatara> Macros are weird to wrap your head around imo |
08:19:35 | * | shirleyquirk joined #nim |
08:20:29 | FromDiscord | <tomck> In this case it's not, thanks though! |
08:22:03 | * | shirleyq2 quit (Ping timeout: 260 seconds) |
08:23:03 | * | shirleyq1 joined #nim |
08:23:36 | * | vv joined #nim |
08:26:20 | * | shirleyquirk quit (Ping timeout: 265 seconds) |
08:33:34 | FromDiscord | <Ricky Spanish> anyone know how to fix this? ``` Build configuration failed - No build files found in C:\Users\myuser\nimcache\nimterop\mypackage``` not sure how to fix this when i do nimble build, no mypackage folder appears in the nimcahce/nimterop folder |
08:35:54 | * | shirleyquirk joined #nim |
08:36:27 | * | shirleyquirk quit (Read error: Connection reset by peer) |
08:37:28 | * | shirleyq1 quit (Ping timeout: 258 seconds) |
08:46:24 | FromDiscord | <tomck> have you added 'outdir' to the getHeader call? |
08:46:49 | FromDiscord | <tomck> I missed ou this param, and it causes getHeader to not output anything, so it never creates the project cache folder, so you end up getting 'no build file found' later on down the line @Ricky Spanish |
08:47:51 | * | hnOsmium0001 quit (Quit: Connection closed for inactivity) |
08:48:58 | FromDiscord | <Ricky Spanish> sent a code paste, see https://play.nim-lang.org/#ix=2wVm |
08:49:06 | * | abm joined #nim |
08:49:35 | FromDiscord | <tomck> oh, you also need to say how to fetch it when building |
08:49:53 | FromDiscord | <tomck> so, |
08:49:55 | FromDiscord | <Ricky Spanish> ah how do i do that? i was trying nimble build |
08:50:51 | FromDiscord | <tomck> nim c -r -d:onnxruntimeGit my_file.nim |
08:51:04 | FromDiscord | <tomck> I think? i'm no expert, i was doing this yesterday with another c lib though |
08:51:13 | FromDiscord | <tomck> https://github.com/tomc1998/nim_flecs_bindings |
08:51:31 | FromDiscord | <tomck> If you add this before getHeader, you don't need to pass the flag:↵↵setDefines(@["flecsGit"]) |
08:51:41 | FromDiscord | <Ricky Spanish> ah i see i need to just use nim rather than nimble i just presumed nimble would strong-arm the whole process |
08:51:43 | FromDiscord | <tomck> or onxxruntimeGit in your case, i think |
08:52:20 | FromDiscord | <tomck> errr no i think you can use nimble |
08:52:32 | FromDiscord | <tomck> `nimble run -d:onxxruntimeGit` |
08:53:17 | FromDiscord | <tomck> ohhhh no wait mb |
08:53:34 | FromDiscord | <tomck> read this section from nimterop @Ricky Spanish https://github.com/nimterop/nimterop#download--search |
08:53:57 | FromDiscord | <tomck> The name is derived from the header, so you need to define onxxruntime_c_apiGit |
08:54:06 | FromDiscord | <tomck> `nimble run -d:onxxruntime_c_apiGit` |
08:54:54 | FromDiscord | <Ricky Spanish> aah ok i was wondering since it just failed lol |
08:54:59 | FromDiscord | <tomck> It's so that other users can customise where it pulls your C dependency from - if they already have onxxruntime installed on their system, they can make it use that rather than pull from git |
08:55:50 | FromDiscord | <Ricky Spanish> i still seem to get same error not sure why |
09:03:19 | FromDiscord | <mratsim> sent a code paste, see https://play.nim-lang.org/#ix=2wVv |
09:05:33 | * | ee7[m] quit (Quit: Idle for 30+ days) |
09:05:34 | * | skrylar[m] left #nim ("Kicked by @appservice-irc:matrix.org : Idle for 30+ days") |
09:06:22 | FromDiscord | <Ricky Spanish> maybe im missing something, so i have my nimterop nimble project on git, i use requires "giturl" from the project i want it in, then i run nimble run -d:onxxruntime_c_apiGit to run my current nimble project with the requires git url in it and....it falls on its face and nothing is in the cache |
09:08:00 | * | Tanger quit (Quit: Leaving) |
09:17:53 | FromDiscord | <Ricky Spanish> sent a code paste, see https://play.nim-lang.org/#ix=2wVy |
09:35:49 | * | gmaggior joined #nim |
09:38:20 | gmaggior | I am using parsecfg and I would like to do d = loadConfig(verylongstring) to parse a string embedded in code instead of parsing an .ini file on disk. Is that possible? |
09:40:22 | * | Vladar joined #nim |
09:40:35 | Araq | yeah |
09:40:48 | Araq | var ss = newStringStream(specStr) |
09:40:49 | Araq | var p: CfgParser |
09:40:49 | Araq | open(p, ss, filename, 1) |
09:41:09 | Araq | is the snippet testament uses for that |
09:41:32 | Araq | (I'm adding features to testament so I had this code open... :-) ) |
09:42:37 | gmaggior | Araq, I try it. Thank you |
09:42:54 | * | natrys joined #nim |
09:43:29 | * | vv quit (Quit: Ping timeout (120 seconds)) |
09:45:27 | * | apahl quit (Ping timeout: 260 seconds) |
09:46:18 | * | apahl joined #nim |
09:47:49 | Araq | TIL strutils.continuesWith |
09:51:27 | alehander92 | oldExperimentalFeatures |
09:51:36 | alehander92 | is the purpose of this to support more stable features |
09:51:40 | FromDiscord | <Ricky Spanish> solved my problem with nimterop, the issue was the onnx name suffix starts with __ so had to move the cplugin before the getheader or it would not produce the build file and so failed later |
09:51:47 | alehander92 | or to-be-deprecated ones |
09:52:09 | FromDiscord | <mratsim> Oh you're doing an onnx wrapper? |
09:52:14 | FromDiscord | <Ricky Spanish> trying to yeh |
09:52:18 | FromDiscord | <Ricky Spanish> it seems to work so far |
09:52:34 | FromDiscord | <mratsim> I need to resurrect my libtorch wrapper |
09:53:00 | FromDiscord | <mratsim> but nimterop doesn't recursively deal with C++ and I don't want to write all the methods by hand |
09:53:17 | FromDiscord | <Ricky Spanish> yeh i noticed thats why i settled on onnx mostly because it has a pure c dll |
09:53:32 | FromDiscord | <Ricky Spanish> and i dont really care about much other than just running the models i make using pytorch |
09:53:44 | Araq | alehander92, I don't know |
09:54:52 | FromDiscord | <mratsim> I don't have much time to maintain Arraymancer at the moment, especially writing Cuda kernels and backprop for the new layers, so I want to wrap libtorch and add back the Arraymancer macros (slicing in particular) on top |
09:55:23 | FromDiscord | <mratsim> this way people would have a reliable Numpy/PyTorch/Tensorflow in Nim that is reasonably easy to ship (BLAS on WIndows is a pain) |
09:56:10 | FromDiscord | <Ricky Spanish> yeh i noticed arraymancer looked super interesting to me the only reason i wasnt using it was because i need mainly to benchmark from the common frameworks for my phd, but still prefer to have a production runtime whilst using researchy tools |
09:58:10 | FromDiscord | <Ricky Spanish> sounds like a really interesting project but still supporting all the hardware would be a nightmare, what about opencl as well? |
09:58:16 | gmaggior | Araq, sorry I don't get how to obtain from your code about parsecfg a Config object with the stringstream passed (which would be ideal for me, so I can modify and write on disk) |
09:58:18 | FromDiscord | <mratsim> supported |
09:58:22 | FromDiscord | <Ricky Spanish> daam nice |
09:58:37 | FromDiscord | <mratsim> https://github.com/mratsim/Arraymancer/blob/master/tests/tests_opencl.nim |
09:58:48 | FromDiscord | <mratsim> it's lagging behind though |
09:59:06 | FromDiscord | <mratsim> maybe I'll dabble into Vulkan as well, but my new strategy is to write a compiler |
09:59:17 | FromDiscord | <mratsim> https://github.com/numforge/laser/tree/master/laser/lux_compiler |
09:59:36 | FromDiscord | <mratsim> though I'm currently hacking away on cryptographic primitives |
10:00:33 | FromDiscord | <Ricky Spanish> impressive set of projects! not really seen anything attempting that before |
10:05:45 | * | AndChat|21441 joined #nim |
10:05:55 | FromDiscord | <Recruit_main707> ngl mratsim has some of the coolest nim projects |
10:07:50 | * | gmaggior quit (Ping timeout: 265 seconds) |
10:13:34 | * | gmaggior joined #nim |
10:15:30 | * | AndChat|21441 quit (Ping timeout: 256 seconds) |
10:16:57 | alehander92 | yes! |
10:21:12 | alehander92 | Araq: so let me get this straight! |
10:21:34 | Araq | yes? |
10:21:36 | alehander92 | `{.experimental}` flags change where a certain syntax/capability |
10:21:38 | alehander92 | is enabled |
10:21:52 | shashlick | Ricky Spanish hope you fixed your issue |
10:22:16 | shashlick | Your last snippet refers to flecs in setDefines which won't work |
10:22:50 | shashlick | You need to use cfg files or the new define pragma |
10:22:56 | alehander92 | but the actual checking uses a separate flag? |
10:23:53 | shashlick | Like tomck said, the idea is to let the user pick the download method so the person importing the wrapper needs to provide that info |
10:24:05 | alehander92 | because e.g. notNilCheck |
10:24:21 | alehander92 | doesn't seem to need the flag itself |
10:24:23 | FromDiscord | <Ricky Spanish> yeh i removed it in the end, the real issue was the nimble module wasnt actually finishing since onnx has prefixes on method names using __ and my cplugin was declared after the getheader declaration, so no build file |
10:25:03 | alehander92 | (the old notNilCheck) |
10:28:35 | * | AndChat|21441 joined #nim |
10:29:19 | alehander92 | so basically it always does the old not nil checking |
10:29:35 | Araq | is that a question? |
10:29:39 | shashlick | CPlugin doesn't affect getHeader though |
10:29:45 | Araq | I am waiting for a question mark |
10:29:59 | alehander92 | do we need experimental: strictnotnil? |
10:30:10 | Araq | yeah we do |
10:30:22 | alehander92 | but it would behave super differently from the old notnil |
10:30:33 | * | gmaggior quit (Ping timeout: 258 seconds) |
10:30:34 | alehander92 | the old just enables the `not nil` syntax |
10:30:50 | alehander92 | but it never stops actual checking for unsafe deref in functions |
10:30:50 | FromDiscord | <Ricky Spanish> sent a code paste, see https://play.nim-lang.org/#ix=2wVS |
10:31:26 | Araq | well it's a new experimental flag, it should imply notnil to enable the syntax |
10:31:31 | FromDiscord | <Ricky Spanish> but if it was after the getheader it didnt seem to work |
10:31:32 | shashlick | Cool, cPlugin is used by cImport |
10:32:12 | shashlick | You can also use -E__ flags to make life easier |
10:32:35 | FromDiscord | <Ricky Spanish> ah that might be more pretty for sure |
10:32:43 | FromDiscord | <Ricky Spanish> thanks @shashlick |
10:32:48 | alehander92 | Araq but can we push experimental flags and pop them? |
10:33:01 | shashlick | There's -E -F and -G for simple cases |
10:33:15 | shashlick | Prefix, suffix and replace |
10:33:45 | * | agent0x00 joined #nim |
10:33:53 | Araq | alehander92, yes |
10:34:00 | AndChat|21441 | In parsecfg, I do d = loadConfig(stream) where stream points to the specString, but I get an error "cannot open" the string |
10:36:27 | alehander92 | ok, so i can still check third party stuff with `--experimental=strictNotNil` as wel |
10:36:48 | alehander92 | good, i copied how strictFuncs are checkd |
10:38:36 | Araq | yup |
10:38:40 | Araq | bbl |
10:43:12 | * | gmaggior joined #nim |
10:45:01 | FromGitter | <eagledot> Does somebody know nim library or bindings for decoding video files? I was trying to use avbin nim bindings at github (https://github.com/Vladar4/avbin). But unfortunately shared library fails to load on linux, it work on window though. |
10:45:07 | * | AndChat|21441 quit (Ping timeout: 258 seconds) |
10:48:27 | * | AndChat|21441 joined #nim |
10:50:04 | * | gmaggior quit (Ping timeout: 256 seconds) |
10:51:23 | FromDiscord | <Ricky Spanish> shouldnt nim ffmpeg allow do it? https://github.com/mashingan/nimffmpeg |
10:52:41 | FromDiscord | <Ricky Spanish> i mean basically looks like ud need to know ffmpeg to begin with to use it but still |
10:52:59 | * | agent0x00 quit (Ping timeout: 240 seconds) |
10:54:05 | FromGitter | <eagledot> I was looking through it , but have not tried it.Have you tried it ? |
10:54:19 | FromGitter | <eagledot> Just asking if it works on all platforms.. |
10:55:29 | * | solitudesf quit (Remote host closed the connection) |
10:56:59 | FromGitter | <eagledot> Also was reading your discussion earlier do you know a way to use pytorch models easily in Nim,just wanted to do inference... |
11:00:43 | * | maier quit (Ping timeout: 260 seconds) |
11:01:04 | * | gmaggior joined #nim |
11:02:22 | * | AndChat|21441 quit (Ping timeout: 256 seconds) |
11:05:11 | * | superbia joined #nim |
11:05:34 | * | solitudesf joined #nim |
11:07:18 | * | Vladar quit (Quit: Leaving) |
11:10:54 | FromDiscord | <Recruit_main707> there was a wrapper for torch, but its outdated |
11:12:50 | FromDiscord | <Recruit_main707> eagledot have you tried changing this name?↵https://github.com/Vladar4/avbin/blob/master/avbin.nim#L100 |
11:14:25 | FromGitter | <eagledot> I actually installed the libavbin.so.10 , i mean yes,i checked it |
11:15:11 | FromGitter | <eagledot> I actually ran the binary with strace , it was looking for a file *ld.so.nohwcap* |
11:16:03 | FromDiscord | <Recruit_main707> i see |
11:18:44 | * | krux02 quit (Read error: Connection reset by peer) |
11:19:38 | * | krux02 joined #nim |
11:19:53 | * | maier joined #nim |
11:21:35 | FromDiscord | <Recruit_main707> how could you wrap a static library in nim? |
11:22:06 | * | D_ quit (Ping timeout: 244 seconds) |
11:22:40 | FromDiscord | <Recruit_main707> (im not sure if its the same, but when i say static library i mean a .lib) |
11:25:22 | * | D_ joined #nim |
11:35:15 | * | AndChat|21441 joined #nim |
11:36:13 | * | gmaggior quit (Ping timeout: 246 seconds) |
11:40:23 | * | gmaggior joined #nim |
11:42:14 | * | AndChat|21441 quit (Ping timeout: 258 seconds) |
11:52:35 | * | AndChat|21441 joined #nim |
11:53:56 | * | gmaggior quit (Ping timeout: 256 seconds) |
11:53:59 | * | Zectbumo quit (Remote host closed the connection) |
11:55:34 | FromDiscord | <mratsim> @Recruit_main707 there is nimtorch, it usesa docker and pinned backend so it might work |
11:58:12 | * | Vladar joined #nim |
12:05:17 | * | gmaggior joined #nim |
12:06:01 | * | supakeen quit (Quit: WeeChat 2.9) |
12:06:23 | * | AndChat|21441 quit (Ping timeout: 258 seconds) |
12:06:37 | * | supakeen joined #nim |
12:14:31 | * | superbia quit (Quit: WeeChat 2.9) |
12:14:58 | * | AndChat|21441 joined #nim |
12:15:46 | * | gmaggior quit (Ping timeout: 246 seconds) |
12:18:11 | FromDiscord | <lantos> why does this break? |
12:18:12 | FromDiscord | <lantos> https://play.nim-lang.org/#ix=2wWx |
12:18:47 | FromDiscord | <lantos> (edit) 'https://play.nim-lang.org/#ix=2wWx' => 'https://play.nim-lang.org/#ix=2wWy' |
12:19:04 | FromDiscord | <lantos> it works when calling manually table[0] = Object() |
12:24:33 | * | gmaggior joined #nim |
12:24:55 | FromDiscord | <mratsim> try making your Table mutable |
12:26:37 | * | AndChat|21441 quit (Ping timeout: 264 seconds) |
12:30:10 | * | AndChat|21441 joined #nim |
12:31:25 | * | gmaggior quit (Ping timeout: 264 seconds) |
12:43:13 | * | federico3 needs a new keyboard |
12:46:07 | * | tane joined #nim |
12:49:27 | alehander92 | *how to write like this |
12:50:31 | * | alehander92 ok |
13:00:01 | Oddmonger | i don't see «arrays» in the collections of https://nim-lang.org/docs/lib.html#pure-libraries-collections |
13:00:35 | Oddmonger | well in fact in don't see seqs , i just see sets |
13:00:51 | Oddmonger | (i hope it's not a moronic question, cf the forum /o\ ) |
13:02:09 | alehander92 | sequtils |
13:02:12 | alehander92 | are in algorithms |
13:04:48 | alehander92 | arrays .. probably don't have many non-system things or you can just use algorithms/sequtils |
13:06:23 | Oddmonger | ah ok. I wanted to check the methods available with array |
13:07:20 | Oddmonger | the goal is to use an array in a non numerical loop, so i can use a separate counter, or have a «push» function for arrays (i doubt it) or use a seq instead of array |
13:09:35 | FromDiscord | <Rika> system.pairs |
13:09:55 | Oddmonger | i look this, thank you |
13:11:05 | FromDiscord | <Rika> oops its in iterators https://nim-lang.org/docs/iterators.html#pairs.i%2CopenArray%5BT%5D |
13:13:12 | * | narimiran quit (Ping timeout: 256 seconds) |
13:13:34 | Oddmonger | noted |
13:23:56 | FromDiscord | <Clyybber> Araq: #15281 really shouldn't be backported IMO |
13:23:57 | disbot | https://github.com/nim-lang/Nim/pull/15281 -- 6fixes #15280 [backport:1.2] |
13:24:10 | Araq | it should |
13:24:17 | FromDiscord | <Clyybber> Its a breaking change? |
13:24:19 | Araq | 1.0 doesn't accept the code |
13:24:27 | Araq | and it was an oversight that 1.2 accepts it |
13:24:36 | Araq | I know you were aware, I wasn't |
13:25:43 | FromDiscord | <Clyybber> I don't quite get why we should forbid that code at all |
13:25:52 | FromDiscord | <Clyybber> We allow break and continue too, and for good reason IMO |
13:26:42 | FromDiscord | <Clyybber> I like to think about if/case/... expressions as a kind of safety feature |
13:27:35 | FromDiscord | <Clyybber> If the lhs is a variable declaration and the rhs an if expression then it prevents reading the variable uninitialized |
13:28:16 | FromDiscord | <Clyybber> So all statements that break out of the block that the variable declaration/assignment (or just the parent scope of the if expr) resides in should be allowed |
13:29:07 | Araq | break and continue do not yield values |
13:29:57 | Araq | you can argue that 'return' is like 'break' and 'return value' isn't |
13:30:13 | FromDiscord | <Clyybber> return value is like result = value; break |
13:30:13 | Araq | but 'return' is short for 'return result' so meh |
13:30:22 | alehander92 | it isn't |
13:30:26 | alehander92 | this makes refactoring harder, if you add a `var a = if .. ` |
13:30:36 | alehander92 | suddenly this return doesn't make sense |
13:30:45 | alehander92 | imho |
13:30:54 | FromDiscord | <Clyybber> alehander92: Who are you replying to, me or Araq? |
13:31:07 | Araq | well yeah, 'result = value' produces 'void' and you're in an expression (non-void) context |
13:31:13 | alehander92 | you (i think it's not good to see it as just a result = if ..) |
13:31:14 | Araq | it shouldn't be allowed |
13:31:33 | FromDiscord | <Clyybber> Araq: Huh? `if a: var b = 1; true` is allowed |
13:31:41 | FromDiscord | <Clyybber> it only must end in an expression |
13:31:47 | FromDiscord | <Clyybber> or a last block statement |
13:32:07 | Araq | yeah well |
13:32:17 | Araq | 'true' is a value and 'break' isn't |
13:32:37 | FromDiscord | <Clyybber> Yeah, but break is allowed |
13:33:00 | Araq | break sucks too, originally we only wanted to allow 'raise' |
13:33:07 | FromDiscord | <Clyybber> But that sucks even more |
13:33:15 | alehander92 | expr-s are assignable, right? |
13:33:22 | alehander92 | i think in ocaml there was the thing |
13:33:24 | Araq | because 'raise' actually indicates a logical problem |
13:33:35 | alehander92 | where pattern matching on raiseable thing can assign the exception |
13:33:49 | alehander92 | but this would be just weird here |
13:33:55 | FromDiscord | <Clyybber> Araq: What sucks about it? From a user perspective, not a compiler-dev perspective |
13:33:55 | Araq | IMHO we should only allow 'raise' and .noreturn proc calls |
13:34:57 | Araq | all it does is to support ugly code. |
13:35:15 | Araq | let x = if cond: value else: break |
13:35:18 | Araq | --> |
13:35:20 | FromDiscord | <Clyybber> And removing the support for it forces us to write even uglier code |
13:35:28 | Araq | if not cond: break; let x = value |
13:35:38 | alehander92 | but what does let x = .. break do at all |
13:35:41 | Araq | enforcing code clarity is a good thing |
13:35:42 | FromDiscord | <Ricky Spanish> is it easier to use something like yacc and wrap the output in nim to define a new parser or is it simple enough to write a grammar parser in nim directly itself or theres already libraries for this type of task? |
13:36:14 | FromDiscord | <Clyybber> Araq: I agree. But its really not anymore clear here IMO |
13:36:22 | alehander92 | conceptual clarity is more important than one line of code |
13:37:17 | * | FromDiscord quit (Remote host closed the connection) |
13:37:27 | Araq | it's pretty objective |
13:37:31 | * | FromDiscord joined #nim |
13:37:43 | Araq | let x = ... # ok, x receives a value |
13:37:51 | Araq | ... break ## ooops |
13:37:53 | FromDiscord | <Rika> what the heck does let x = ... break do? |
13:37:59 | Araq | see? |
13:38:39 | FromDiscord | <Clyybber> Araq: Thats why I said. Only allow jumps that escape the scope of the expression |
13:38:54 | FromDiscord | <Clyybber> So let x = block: break wouldn't be allowed |
13:39:08 | Araq | my example doesn't use 'block' |
13:39:08 | FromDiscord | <Clyybber> but block: let x = if a: 1 else: break would be |
13:39:09 | FromDiscord | <Rika> oh, i see now |
13:39:21 | alehander92 | but this is just confusing code |
13:39:24 | FromDiscord | <Clyybber> Araq: Yeah, your example is valid, if the ... is an ifexpr |
13:39:35 | Araq | it is an ifexpr |
13:39:35 | alehander92 | because if you move it out of block/loop |
13:39:35 | FromDiscord | <Clyybber> Ok, lets look at the alternative |
13:39:38 | alehander92 | it stops working |
13:39:51 | FromDiscord | <Clyybber> lets assume we have an if expression, only one branch ends in a break |
13:39:57 | Araq | I don't know what the "scope of the expression" means |
13:39:59 | FromDiscord | <Clyybber> everything else assigns a value |
13:40:01 | alehander92 | and you get several characters less, but a much more complicated `let a = b` rules |
13:40:11 | FromDiscord | <Clyybber> Araq: The scope where the if expression resides in |
13:40:22 | FromDiscord | <Clyybber> So after this change you adapt your code |
13:40:49 | FromDiscord | <Clyybber> either you move the `let x` out of the if, change all expressions into x = value and change the let to a var |
13:41:20 | FromDiscord | <Clyybber> Or you simply do `let x = if a: ... else: break; dummyExpr` |
13:41:32 | FromDiscord | <Clyybber> Now whats the benefit in dummyExpr. Its never reached? |
13:41:37 | Araq | I don't care, I don't optimize the language design for "number of characters you have to change when your control flow changed" |
13:42:18 | FromDiscord | <Clyybber> My control flow didn't change. The compiler did |
13:43:12 | Araq | well "import packages" is a proof that nobody really used this stunt |
13:43:21 | alehander92 | but the cost of learning all those rules for assignment |
13:43:25 | Araq | the compiler had a bug and it got fixed |
13:44:05 | Araq | arguably it's still buggy by allowing 'break', as I said the rule was about .noreturn procs and 'raise' |
13:44:17 | Araq | because 'case' statements are exhaustive |
13:44:20 | FromDiscord | <Clyybber> Its not a bug, it was an explicit feature https://github.com/nim-lang/Nim/pull/13520 |
13:44:21 | disbot | ➥ EndsInNoReturn in expressions extension, fixes #13490 |
13:44:36 | alehander92 | reminds me of `a[b++] = stuff` a bit |
13:45:48 | Araq | Clyybber: I wasn't aware it was Cooldome's work but this shouldn't have passed code review |
13:45:59 | diprustek | this again. |
13:46:56 | Araq | in fact, Cooldome merged his own PR :-) |
13:46:59 | alehander92 | it has a certain elegance, but it seems too much |
13:47:15 | Araq | all I did is to outline that it had merge conflicts |
13:47:26 | Araq | preventing me from reviewing it |
13:47:49 | Araq | but let's assume I merged it. Then I made a mistake, happens. |
13:48:31 | FromDiscord | <Clyybber> Should we reopen https://github.com/nim-lang/Nim/issues/13490 then? It was high priority |
13:48:33 | disbot | ➥ try expression doesn't work with return on expect branch ; snippet at 12https://play.nim-lang.org/#ix=2cCk |
13:49:21 | FromDiscord | <haxscramper> sent a long message, see http://ix.io/2wWX |
13:49:35 | Araq | no, it's not a valid bug |
13:49:43 | Araq | don't reopen invalid bug reports |
13:49:55 | * | diprustek is now known as disruptek |
13:50:03 | Araq | and change the spec to be really explicit about this |
13:50:32 | FromDiscord | <haxscramper> And I was mostly trying different ideas for it. But it has a lot of primitives for parsing (e.g. generic parse tree, tokens and other things that can be used for constructing own parser) |
13:50:36 | FromDiscord | <Ricky Spanish> awesome thanks for the links @haxscramper |
13:50:38 | alehander92 | but the return thing is not really the same as raise |
13:51:18 | FromDiscord | <Ricky Spanish> well im just looking to do take a clang generated ast tree and parse it back to a usable tree structure basically |
13:51:20 | disruptek | have we measured whether anyone uses break? |
13:51:32 | FromDiscord | <mratsim> I do |
13:51:33 | * | fowl_ quit () |
13:51:35 | alehander92 | raise bubbles up naturally |
13:52:02 | alehander92 | and rvalues can make your code raise |
13:52:05 | FromDiscord | <Clyybber> alehander92: Its absolutely the same. Before you could build your own exceptions; use a template raiseCustom = setException; return |
13:52:08 | FromDiscord | <Clyybber> Now you can't |
13:52:22 | FromDiscord | <mratsim> not in assignment though: https://github.com/mratsim/weave/blob/5ca533182beb8e46e4299fed4e20aff06962b34b/benchmarks/single_task_producer/weave_spc.nim#L56-L59 |
13:52:30 | alehander92 | but clyybber think of it that way |
13:52:40 | alehander92 | i dont want my rvalues to b able to .. return / break / continue |
13:52:42 | disruptek | we're talking about assignments. |
13:52:45 | FromDiscord | <haxscramper> @Ricky Spanish ast generated from yacc output, or you just want to parse some other C code? |
13:52:49 | alehander92 | imagine it's not an expr, but a function. |
13:52:53 | FromDiscord | <Clyybber> alehander92: Then don't write code that does it. |
13:52:53 | FromDiscord | <haxscramper> & using libclang for this? |
13:53:00 | alehander92 | now imagine I call a function and it breaks from my loop or returns |
13:53:05 | alehander92 | this would be super confusing |
13:53:17 | Araq | f(a, b, (c; break), d) |
13:53:23 | alehander92 | raise is the exception, as that's exactly the goal of raise: to bubble up stuff |
13:53:35 | alehander92 | Araq that's different, as it's the argument that break |
13:53:51 | FromDiscord | <Clyybber> No its not different. And yes that code is confusing |
13:54:17 | alehander92 | but i agree that even this sucks |
13:54:19 | FromDiscord | <Clyybber> Its exactly as confusing if there were a raise there |
13:54:34 | alehander92 | but that's what raise do: it goes through function and all kinds of boundaries |
13:54:41 | FromDiscord | <Ricky Spanish> @haxscramper the ast is already generated from clang from c and i want to read that output back into nim into a structure, so ast back to some kind of tree |
13:54:58 | FromDiscord | <Clyybber> alehander92: See, I said we should allow everything that breaks out of the scope that the expression resides in |
13:55:01 | disruptek | clyybber: do you destroy lvalue if you break there? |
13:55:19 | FromDiscord | <Clyybber> disruptek: arc can handle all that |
13:55:20 | alehander92 | Clyybber but I don't agree: because if you want to break, just use a statement |
13:55:28 | alehander92 | and keep the language simpler |
13:55:41 | FromDiscord | <Clyybber> alehander92: but I can still raise? |
13:55:43 | alehander92 | and the definition of expression simpler |
13:55:56 | alehander92 | yes, because `call()` already can raise |
13:55:59 | FromDiscord | <Clyybber> no it doesn't. because we allow raise anyways |
13:56:02 | alehander92 | because that's *why* we have raise |
13:56:12 | alehander92 | but raise != return and raise != break |
13:56:14 | disruptek | break is a statement, so it shouldn't terminate an expression. |
13:56:30 | FromDiscord | <Clyybber> alehander92: No raise == return + ... and return == break + ... |
13:56:39 | alehander92 | `call()` can raise in my function |
13:56:46 | FromDiscord | <haxscramper> > the ast is already generated from clang ↵@Ricky Spanish if you are trying to parse textual output for clang - (1) AFAIK it can dump json, (2) I'd recommend using a libclang library to get AST directly in nim, without parsing things. |
13:56:49 | alehander92 | `call()` can't suddenly break out of my loop |
13:57:03 | alehander92 | and `call()` can't suddenly just return a value from my caller function |
13:57:06 | FromDiscord | <Clyybber> alehander92: Yeah? But thats unrelated. |
13:57:09 | Araq | think about it this way: "feature X allows Y which is bad code. ok, so what, feature X also is required for good reasons" |
13:57:16 | FromDiscord | <Clyybber> alehander92: raise can break out of your loop |
13:57:17 | alehander92 | this is the whole point how is it unrelated |
13:57:23 | alehander92 | that's the conceptual differnce |
13:57:26 | Araq | well we don't have these "good reasons" here to allow it |
13:57:28 | alehander92 | between raise and the others |
13:57:36 | FromDiscord | <Ricky Spanish> ah that would make sense @haxscramper yeh might skip the extra step i suppose, and i tried the json dump but never worked for me on windows for some reason |
13:57:38 | Araq | only foolish examples exist. |
13:57:49 | Araq | all it accomplishes is to allow convoluted code. |
13:57:55 | Araq | no benefits are known |
13:57:57 | disruptek | i think clyybber is mostly arguing for the purity of the thing. |
13:58:23 | FromDiscord | <Clyybber> alehander92: No there isn't. A call can break out of your loop because it can raise |
13:58:30 | alehander92 | but this is called raise |
13:58:43 | FromDiscord | <Clyybber> So what if it were called customRaise ? |
13:58:51 | alehander92 | `break` would just continue after my loop |
13:58:54 | Araq | clyybber: that's true but *also* bad code |
13:58:55 | alehander92 | a `call` can't do that |
13:59:17 | Araq | you're arguing for "we allow bad code via X, so let's also have it via Y" |
13:59:27 | FromDiscord | <haxscramper> @Ricky Spanish it might be a little annoying to set up, but try using https://github.com/haxscramper/hcparse#example |
13:59:29 | FromDiscord | <Clyybber> alehander92: A break toplevelblock will not allow that |
13:59:39 | Araq | the difference is that X has good reasons for existing and Y hasn't. |
13:59:46 | FromDiscord | <Clyybber> Araq: No I'm arguing for consistency. And this feature does have a good reason to exist |
13:59:55 | FromDiscord | <Clyybber> It allows one to implement your own exceptions system |
14:00:10 | alehander92 | Clyybber but my function can't say "break in the caller" |
14:00:25 | alehander92 | but now my expr can say that |
14:00:27 | FromDiscord | <Ricky Spanish> awesome @haxscramper will give this a go when i get the time looks useful |
14:00:32 | alehander92 | it's inconsistent |
14:00:44 | alehander92 | even templates can't just break iirc |
14:00:52 | alehander92 | because i tried that for a `skip` thing in unittest |
14:00:54 | Araq | clyybber: hardly. |
14:00:57 | disruptek | clyybber: my experience is that sometimes seemingly simple code can develop the need for this feature. |
14:01:08 | AndChat|21441 | (ok my bad: the parsecfg loadConfig(stream) on a string works. I was updating the wrong piece of code of two almost identical :) ) |
14:01:14 | alehander92 | ok they can but in a branch, nvm, different thing |
14:01:18 | Araq | you need a "goto error handler" moreso than a loop exit |
14:01:24 | * | waleee-cl joined #nim |
14:01:53 | FromDiscord | <Clyybber> I'm not talking about loop exits. I'm talking about bubbling up exceptions, via return, not break |
14:01:54 | disruptek | Araq: here's a test from testes: "block goats: discard" |
14:02:01 | FromDiscord | <Clyybber> You set the exception then you return |
14:02:05 | disruptek | here's what testes turns it into: |
14:02:12 | Araq | ok maybe if you inject 'block customLabel; break customLabel' |
14:02:21 | disruptek | http://ix.io/2wX5 |
14:02:26 | Araq | then you can implementat your own exceptions |
14:02:29 | alehander92 | is this what the nim-result lib does btw |
14:02:40 | disruptek | we have to expect very convoluted code construction. |
14:03:02 | disruptek | consistency is more important that whether the code looks servicable. |
14:03:11 | alehander92 | clyybber but even if true, this is only for macro code gen, not for user code |
14:03:21 | Araq | but that seems contrived to me and in the best case argues for 'break' inside expressions, not for return/continue |
14:03:23 | FromDiscord | <Clyybber> Araq: So now I have to work around the fact that return is forbidden, but your plan seems to be to forbid break too? |
14:03:46 | Araq | I see no reason to extend over what 1.0 allowed |
14:04:06 | FromDiscord | <Clyybber> I see no reason to forbid what 1.2 allowed |
14:04:20 | FromDiscord | <Rika> it was mistakenly allowed |
14:04:20 | disruptek | look at that paste. |
14:04:53 | alehander92 | v |
14:04:54 | alehander92 | https://github.com/arnetheduck/nim-result/blob/master/results.nim#L612 |
14:05:00 | alehander92 | ok so why not just doing this ? |
14:05:01 | FromDiscord | <Clyybber> See, the workaround is just more ugly/confusing than the original code |
14:05:05 | alehander92 | clyybber |
14:05:18 | FromDiscord | <Clyybber> You just do `let a = if b: ... else: break; true` |
14:05:34 | alehander92 | ah no return? |
14:05:44 | FromDiscord | <Clyybber> Or return, I don't care. |
14:05:57 | FromDiscord | <Clyybber> My point is that this is worse than `let a = if b: ... else: break` |
14:06:25 | disruptek | worse by what measure? |
14:06:27 | FromDiscord | <Rika> i can see what clyybber means |
14:06:40 | Araq | alehander92's example is good but worked in v1.0 too afaict |
14:06:42 | FromDiscord | <Clyybber> alehander92: Thats unrelated. This has access to the type of the expression |
14:06:51 | FromDiscord | <Clyybber> Araq: Yes because it inserts a dummy value |
14:06:58 | FromDiscord | <Clyybber> (edit) 'value' => 'expression' |
14:07:04 | alehander92 | yeah but the point is it does the custom thing |
14:07:06 | Araq | fine with me. |
14:07:08 | FromDiscord | <Clyybber> But that won't work if you want to implement customRaise |
14:07:22 | FromDiscord | <Clyybber> But a customRaise doesn't have access to the type |
14:07:23 | disruptek | yeah, seems like it is a suitable workaround to prevent prematurely relaxing the spec. |
14:07:53 | FromDiscord | <Clyybber> Unless you want to write `customRaise[T]` everywhere, where T is only used to generate an expression thats never going to be used, just to satisfy the compiler |
14:07:56 | alehander92 | clyybber ? you can just generate code that checks the type |
14:08:31 | Araq | Clyybber: 1. I don't write 'customRaise' and would prefer people to use the existing exception mechanism. these things are not exactly trivial to write. |
14:08:34 | FromDiscord | <Clyybber> alehander92: `?` is not a customRaise. customRaise does not have access to the type |
14:08:43 | Araq | 2. the language change you propose needs an RFC. |
14:08:58 | alehander92 | but the type doesn't really matter , it's about the bubbling mechanism |
14:09:19 | FromDiscord | <Clyybber> alehander92: The type does matter because now you need the type to generate a dummyexpressions |
14:09:34 | FromDiscord | <Clyybber> Before the type didn't matter. Because it should not. |
14:09:35 | Araq | if you care for this feature so much argue for it in an RFC |
14:09:35 | alehander92 | `default` and `typeof` ? |
14:10:07 | disruptek | agree, an RFC will let others show use-cases for/against as well. |
14:11:01 | FromDiscord | <Clyybber> alehander92: We don't have access to the type in customRaise. Now we require the type so we have to do customRaise[T] |
14:11:05 | Araq | and now please add borrow checker stress tests |
14:11:22 | Araq | we have more exciting stuff to do |
14:11:28 | alehander92 | clyybber but we don't : you can use typeof and default and generate code to genrate the value |
14:11:53 | FromDiscord | <Clyybber> alehander92: Again, we don't have access to the type neither a value that contains the type |
14:11:56 | * | endragor quit (Remote host closed the connection) |
14:11:59 | FromDiscord | <Clyybber> (edit) 'contains' => 'has' |
14:12:13 | FromDiscord | <Clyybber> Unless you want to pass some random variable to customRaise |
14:12:19 | alehander92 | ah, the type of the `let` thing? |
14:12:25 | FromDiscord | <Clyybber> Yeah |
14:12:26 | * | endragor joined #nim |
14:12:30 | alehander92 | sorry ok |
14:12:35 | Araq | we need crazy code with proc split(x: openArray[char]): seq[openArray[char]] |
14:12:58 | alehander92 | ok i have to get back to work sorry guys |
14:16:45 | * | endragor quit (Ping timeout: 240 seconds) |
14:18:18 | * | endragor joined #nim |
14:21:04 | * | gmaggior joined #nim |
14:21:21 | Zevv | all work and no play makes alehander92 a dull boy. |
14:22:49 | * | AndChat|21441 quit (Ping timeout: 246 seconds) |
14:23:14 | * | endragor quit (Ping timeout: 258 seconds) |
14:23:22 | * | lritter joined #nim |
14:23:27 | FromDiscord | <Ricky Spanish> you need to do something special for nimterop when there is defines in the C? it cant seem to find this ```#define _Frees_ptr_opt_``` ```error: unknown type name '_Frees_ptr_opt_'↵ ... 177 | #define ORT_CLASS_RELEASE(X) void(ORT_API_CALL * Release##X)(_Frees_ptr_opt_ Ort##X * input)``` |
14:24:08 | FromDiscord | <Clyybber> Araq: Ok, will do. Made a small RFC anyways, containing only the strong arguments |
14:24:17 | FromDiscord | <Clyybber> singular rather |
14:25:53 | Araq | don't misrepresent my arguments :P |
14:26:44 | shashlick | @Ricky Spanish can you link the C code |
14:27:10 | FromDiscord | <Clyybber> Araq: Did I? |
14:28:58 | shashlick | Just saw the code, when do you see that error |
14:29:06 | shashlick | Doesn't seem nimterop related |
14:29:27 | FromDiscord | <Ricky Spanish> sent a code paste, see https://play.nim-lang.org/#ix=2wXa |
14:32:28 | shashlick | What does your wrapper look like |
14:32:58 | FromDiscord | <Ricky Spanish> sent a code paste, see https://play.nim-lang.org/#ix=2wXb |
14:37:06 | * | endragor joined #nim |
14:37:14 | Araq | clyybber no |
14:37:34 | Araq | I tried to say "please don't mispresent" and wasn't aware that you already wrote the RFC |
14:37:45 | Araq | which could be a bit longer, you know... |
14:38:02 | FromDiscord | <Clyybber> heh, yeah. |
14:38:40 | disruptek | !rfc author:clyybber |
14:38:41 | disbot | https://github.com/nim-lang/RFCs/issues/251 -- 3Allow return in expressions again |
14:39:23 | disruptek | the discussion should extend to break, imo. |
14:40:08 | * | arecacea1 quit (Remote host closed the connection) |
14:40:36 | * | arecacea1 joined #nim |
14:43:47 | Araq | also maybe we need people who actually want to implement their own exception system |
14:44:14 | disruptek | i will put up a sign on the street. |
14:45:28 | FromDiscord | <Rika> lmao |
14:45:42 | Araq | it's kinda depressing to spend weeks on a feature and then caring for people who seek to invent an inferior system based on ignorance and superstition |
14:46:32 | disruptek | i just think expressions should always be values. weird, i know. |
14:48:15 | disruptek | nimpretty cannot consume the output from my testes. |
14:48:58 | * | endragor quit (Ping timeout: 256 seconds) |
14:49:19 | * | arecacea1 quit (Remote host closed the connection) |
14:49:22 | FromDiscord | <Clyybber> Araq: Are you talking about borrowing? |
14:51:13 | * | arecacea1 joined #nim |
14:51:14 | * | agent0x00 joined #nim |
14:52:01 | Araq | yes. I implemented it |
14:52:11 | Araq | all of it |
14:52:29 | Araq | and then I couldn't be bothered to test it well :D |
14:52:48 | disruptek | eh it's probably fine. |
14:53:02 | Araq | yeah that's the spirit |
14:54:17 | disruptek | who understands hcr? better yet, who uses it? |
14:54:46 | FromDiscord | <mratsim> I don't know how you do it. When I implement complex stuff, i have to write a test otherwise i always manage to introduce a corner case |
14:55:08 | Araq | mratsim: I outsource the testing to the community |
14:55:09 | FromDiscord | <mratsim> ask @viktor in Nimbus/newbie-help, he wrote it 😉 |
14:55:24 | disruptek | yeah, anyone /but/ him. |
14:55:43 | * | maier quit (Ping timeout: 246 seconds) |
14:56:02 | disruptek | if i ever meet that guy, i'm gonna throatpunch him. |
14:56:05 | FromDiscord | <mratsim> Well, I know I am the guinea pig for static/generics/concepts/typedesc/distincts/range |
14:56:45 | Araq | yeah but that's the old stuff, the new stuff is better designed *cough* |
14:57:01 | FromDiscord | <mratsim> famous last words :p |
14:57:08 | disruptek | Araq: i don't like your approach. |
14:57:26 | Araq | disruptek: I like your style |
14:57:31 | FromDiscord | <mratsim> is there a flag for the new concepts? |
14:57:51 | * | endragor joined #nim |
14:57:54 | Araq | no, it's 'concept c' vs 'concept' in the syntax and I didn't merge the branch |
14:58:09 | Araq | because it's still unusable, I'm fixing bugs |
15:09:45 | * | leorize joined #nim |
15:12:45 | * | gmaggior quit (Quit: Bye) |
15:18:36 | disruptek | so basically, no one uses hcr. |
15:19:50 | * | a_chou joined #nim |
15:22:44 | * | konkrrrrrr joined #nim |
15:23:15 | shashlick | there are open issues but no maintainer - https://github.com/nim-lang/Nim/issues?q=is%3Aissue+is%3Aopen+hcr |
15:23:49 | Araq | the maintainer exists but is overly busy |
15:24:09 | disruptek | i'm not sure that's a thing. |
15:24:30 | Araq | don't touch HCR |
15:24:45 | disruptek | well, it doesn't work. |
15:24:51 | Araq | if you need to disable it because of IC so be it, IC is kinda a precondition for HCR |
15:25:16 | disruptek | i am assuming that jsonutils gets removed as a precondition to mangling. |
15:25:25 | * | kinkinkijkin quit (Ping timeout: 264 seconds) |
15:25:34 | Araq | that's crazy talk |
15:25:36 | * | kinkinkijkin joined #nim |
15:25:48 | disruptek | why? |
15:25:57 | disruptek | you said you'd review a PR to deprecate it. |
15:26:06 | Araq | er |
15:26:14 | Araq | yeah but for different reasons |
15:26:19 | disruptek | not my problem. |
15:26:29 | disruptek | my problem is that it doesn't pass the test in cpp. |
15:26:47 | disruptek | also, i hate the code. |
15:26:53 | disruptek | never should have merged, imo. |
15:27:03 | Araq | let's consider a different question |
15:27:16 | Araq | what except jsonutils fails with your new name mangling? |
15:27:20 | disruptek | hcr. |
15:27:28 | Araq | in particular, does it work for every important package? |
15:27:38 | * | konkrrrrrr quit (Ping timeout: 258 seconds) |
15:27:38 | disruptek | i don't know how to learn the answer. |
15:27:58 | Araq | the CIs can tell you |
15:29:05 | disruptek | how? |
15:30:04 | Araq | some CIs specialized on testing important packages |
15:30:15 | Araq | you need to click through them all |
15:30:24 | * | fredrikhr quit (Read error: Connection reset by peer) |
15:30:31 | Araq | it's a mess :-) |
15:31:08 | disruptek | well, when i looked, it seemed they all failed nim tests, so... |
15:32:32 | disruptek | okay, the azure pipelines are useless i guess. |
15:32:54 | disruptek | stint, chronos, arraymancer. |
15:33:23 | Araq | what about them? |
15:33:25 | FromDiscord | <haxscramper> Is it possible to make custom n-ary operators like `[]=`, or this is a special case implemented in compiler? |
15:33:39 | disruptek | they fail. |
15:34:13 | Araq | haxscramper: it's possible if you use 'varargs' for the index type |
15:34:21 | Araq | at least that's how I remember it |
15:34:40 | Araq | disruptek: ok, these are not important, we can simply remove this code too then |
15:34:57 | * | thomasross joined #nim |
15:35:10 | disruptek | well, they may fail for good reason. |
15:35:21 | Araq | much easier than fixing name mangling bugs, I'm sure they all are "bad" code :P |
15:35:55 | disruptek | norm, optionsutils, strunicode also fail. |
15:36:13 | Araq | yeah ... nobody uses these packages :P |
15:36:15 | disruptek | strunicode seems like it's unrelated. |
15:36:25 | * | thomasross quit (Remote host closed the connection) |
15:36:49 | * | thomasross joined #nim |
15:36:51 | disruptek | ws looks like it's failing with a use-after-free. |
15:37:39 | disruptek | optionsutils looks like it could be from mangling. |
15:37:46 | disruptek | i will see if i can repro locally. |
15:39:35 | * | superbia joined #nim |
15:43:12 | FromDiscord | <lqdev> https://play.nim-lang.org/#ix=2wXF sad noises |
15:43:45 | FromDiscord | <Recruit_main707> i have made custom []= functions |
15:43:46 | FromDiscord | <mratsim> What are your name mangling doing? does it mangle local variables? |
15:43:57 | FromDiscord | <Recruit_main707> nvm |
15:44:13 | FromDiscord | <mratsim> because Arraymancer might expect no mangling of local variable for some inlined C code |
15:44:29 | disruptek | yeah, i will look at that last. |
15:44:37 | disruptek | it can mangle virtually every symbol. |
15:44:58 | disruptek | i mean, it's rare that there's a symbol that won't go through this codepath. |
15:45:23 | disruptek | also type names, but those are generally not a problem, obviously. |
15:47:27 | FromDiscord | <haxscramper> How 'experimental' is AST based overloading? |
15:47:47 | leorize | it's terrible ux-wise |
15:48:07 | leorize | when a mismatch happens you don't even know why it fails |
15:48:17 | disruptek | ugh, lambda parameter name clashing. |
15:48:25 | krux02 | haxscramper: It works, but it's behavior in unspecified and implementation dependent and uses compier internal symbol names. |
15:49:05 | krux02 | it is not buggy or anything, but there is nothing holiding the implementation of Nim to just remove it. |
15:49:43 | krux02 | and may I say that the current implementation the behavior is based upon is not fully tested. |
15:49:57 | krux02 | So go ahead, have fun with it. |
15:50:11 | krux02 | But before you depend your project on it, maybe you should push a formal specification for it. |
15:50:51 | FromDiscord | <haxscramper> I'm not planning to use it for anything serious, but I made custom `[]~` operator hack and used some ast overloading - https://play.nim-lang.org/#ix=2wXK - it might not have the best error message on cases like `3 ~ 2`, but I really liked `untyped{nkBracketExpr}` for macro parameter. |
15:51:29 | Araq | ha |
15:51:34 | FromDiscord | <haxscramper> And whatever described in experimental manual looks *really* good |
15:51:49 | disruptek | fun fun. |
15:52:05 | Araq | the question is do you need it for overload disambiguation. because if not, you can also do expectKind n, nnkBracketExpr |
15:52:19 | FromDiscord | <haxscramper> So in short - it works, but underspecified & I'd better write some more unit tests for it. |
15:52:56 | Araq | I think we should remove it, it predates move semantics and was introduced for something like move semantics |
15:53:28 | FromDiscord | <haxscramper> > the question is do you need it for overload disambiguation.↵Yes, of course it is useful for overload disambiguation. I don't think I can come up with use cases right now because I only found out about it |
15:53:59 | Araq | well in a macro it's easy enough to dispatch based on node kind |
15:54:49 | FromDiscord | <haxscramper> But it means you need to have a macro, when instead you could've written two templates |
15:55:12 | FromDiscord | <haxscramper> And for simple cases ast overloading makes cleaner API - you can see what kind of AST is expected just from parameters |
15:56:45 | * | a_chou quit (Ping timeout: 240 seconds) |
15:56:56 | FromDiscord | <haxscramper> Unless you have something like`t{x = (~x){y} and (~x){z}}(x, y, z: bool)` |
15:59:32 | disruptek | do important packages only get tested on linux? |
15:59:50 | alehander92 | haxscrampeer but this usecase is about types again |
16:00:08 | Araq | disruptek: no, windows too but not on BSD |
16:00:10 | alehander92 | and specifically different variants of a type |
16:00:38 | alehander92 | ah but you want to do a more general match thing |
16:00:40 | alehander92 | i see |
16:01:32 | disruptek | i think the windows packages tests don't run if nim's tests fail. is that right? |
16:01:37 | alehander92 | Araq I have another question you might dislike |
16:01:45 | alehander92 | should we detect this as a warning |
16:01:51 | alehander92 | https://www.irccloud.com/pastebin/ea0stfTa/ |
16:02:07 | * | haxscramper joined #nim |
16:02:23 | Araq | how can this produce a nil value? |
16:03:49 | disruptek | you can't warn there; you'd be warning on almost every not nil return. |
16:03:58 | alehander92 | yeah exactly |
16:05:38 | * | hnOsmium0001 joined #nim |
16:06:21 | * | a_chou joined #nim |
16:07:03 | alehander92 | seems that it doesn't make sense to check that for now indeed |
16:07:04 | alehander92 | cool |
16:07:59 | disruptek | we have observable warnings anyway. there's really no other interaction to worry about. |
16:09:41 | FromDiscord | <lqdev> will nim ever get unused param warnings? |
16:09:49 | alehander92 | ok |
16:11:28 | Araq | lqdev: if you implement it |
16:11:53 | disruptek | it's pretty easy to impl. |
16:12:07 | FromDiscord | <lqdev> were they never implemented because of some limitation, or lack of interest? |
16:13:05 | disruptek | we probably just overlook skParam symbol types. |
16:15:03 | * | vicfred joined #nim |
16:16:37 | Araq | neither. often you need the additional parameters for proc type interop. and before we got '_' for parameter names, we couldn't warn about unused parameters |
16:17:14 | disruptek | unused tracking came after _ though. |
16:17:25 | Araq | no it didn't |
16:17:29 | disruptek | wut |
16:17:46 | Araq | pretty sure I implemented that long before '_' was added |
16:18:30 | Araq | and .used was added later |
16:18:54 | disruptek | that's what i remember. |
16:22:30 | disruptek | i've really written a lot of stuff in < 18 months of nim. |
16:22:43 | disruptek | https://github.com/disruptek -- i enumerated most of my projects. |
16:23:42 | disruptek | lambdas aren't all closures? |
16:25:53 | alehander92 | wow cool dashboard |
16:26:51 | disruptek | too much red. |
16:41:55 | FromDiscord | <lantos> @mratsim thanks |
16:43:30 | alehander92 | yeah man |
16:43:34 | alehander92 | why so many CI-s |
16:43:41 | alehander92 | i am going to stream a bit |
16:43:50 | alehander92 | do you still have slow conn |
16:44:10 | disruptek | yeah, unfortunately. |
16:45:48 | * | MyMind quit (Read error: Connection reset by peer) |
16:46:56 | * | MyMind joined #nim |
16:52:05 | * | maier joined #nim |
16:52:31 | disruptek | what we have here is a failure to obfuscate. |
16:57:02 | * | maier quit (Ping timeout: 256 seconds) |
17:01:59 | * | abm quit (Read error: Connection reset by peer) |
17:05:59 | FromDiscord | <Avatarfighter> what's good everyone how are you all doing |
17:06:21 | disruptek | i'm pissed. |
17:06:29 | FromDiscord | <Avatarfighter> why? |
17:06:40 | disruptek | started drinking early. |
17:06:54 | disruptek | rough night with my little man. |
17:06:56 | FromDiscord | <Avatarfighter> drinking water amiright |
17:07:02 | FromDiscord | <Avatarfighter> ah |
17:07:06 | Zevv | little man |
17:07:13 | disruptek | don't judge. |
17:07:19 | FromDiscord | <Avatarfighter> Zevv: disruptek jr |
17:07:25 | Zevv | man size matters |
17:07:53 | Zevv | with disruptek everything is an euphimism until proved otherwise |
17:08:05 | disruptek | lol |
17:08:09 | FromDiscord | <Avatarfighter> ahah |
17:08:15 | disruptek | there's probably a fair amount of truth to that. |
17:08:27 | FromDiscord | <Avatarfighter> jeez i don't want to do school work I just want to do nim stuff |
17:10:43 | FromDiscord | <ⓗⓐⓡⓓ ⓣⓞ ⓣⓐⓖ> hello |
17:12:15 | * | endragor quit (Remote host closed the connection) |
17:12:33 | FromDiscord | <ⓗⓐⓡⓓ ⓣⓞ ⓣⓐⓖ> I don't really know vim, but I think I want to learn it↵I want a language with a more ergonomic memory management model than Rust or C, but I am also frustrated with Go's lack of features and (in my opinion) design blunders |
17:13:10 | FromDiscord | <ⓗⓐⓡⓓ ⓣⓞ ⓣⓐⓖ> *nim not vim heh |
17:13:23 | FromDiscord | <Avatarfighter> Nim imo is really easy to learn if you follow the tutorial or the Nim for X programmers guides on github |
17:13:57 | FromDiscord | <Avatarfighter> i read the nim for Python programmers guide and I felt pretty confident with my theoretical nim skills, when I tried to apply those skills though that was a bit different |
17:14:52 | FromDiscord | <ⓗⓐⓡⓓ ⓣⓞ ⓣⓐⓖ> heh |
17:14:55 | FromDiscord | <ⓗⓐⓡⓓ ⓣⓞ ⓣⓐⓖ> that has been my experience with every lang |
17:15:11 | oz | dom96's book is nice to get started too. :) |
17:15:12 | FromDiscord | <ⓗⓐⓡⓓ ⓣⓞ ⓣⓐⓖ> well except for go↵go was so simple I could start writing stuff right away |
17:15:21 | FromDiscord | <Avatarfighter> Yeah dom96's book is great |
17:16:19 | disruptek | nim is as simple or complex as you want it to be. simpler than go or python at first and much more powerful than either once you get ambitious. |
17:16:43 | FromDiscord | <Avatarfighter> in my opinion the structs in go can basically be directly translated nim so you should have no problem starting off with nim @ⓗⓐⓡⓓ ⓣⓞ ⓣⓐⓖ |
17:18:56 | FromDiscord | <ⓗⓐⓡⓓ ⓣⓞ ⓣⓐⓖ> > Nim strongly discourages the use of unsigned integers, as it's considered unnecessary and somewhat unsafe for most applications. |
17:19:10 | FromDiscord | <ⓗⓐⓡⓓ ⓣⓞ ⓣⓐⓖ> hm↵i guess so. |
17:19:30 | Zevv | Well, it's the author of that line discouraging you. Nim will not stop you in any way |
17:19:35 | FromDiscord | <aaaaa> if i may ask |
17:19:40 | FromDiscord | <aaaaa> why's the logo a crown? |
17:19:49 | Zevv | Nimrod lost the "rod" |
17:19:59 | Zevv | know your classics :) |
17:20:03 | FromDiscord | <ⓗⓐⓡⓓ ⓣⓞ ⓣⓐⓖ> I think unsigned integers are fine as long as you have explicit type conversions↵like in rust, array subscripts *have* to be unsigned, which if fine because you explicitly convert, there is no sneaky implicit conversion |
17:20:06 | FromDiscord | <aaaaa> i dont know my classics |
17:20:26 | Zevv | ⓗⓐⓡⓓ ⓣⓞ ⓣⓐⓖ: it's about overflow behaviour I guess |
17:20:38 | FromDiscord | <ⓗⓐⓡⓓ ⓣⓞ ⓣⓐⓖ> yeah |
17:22:48 | FromDiscord | <haxscramper> Is there any list of links for various nim memory management documentation? Aside from manual (https://nim-lang.org/docs/gc.html) there is an article by zevv - http://zevv.nl/nim-memory/ , forum post about new ARC memory management https://forum.nim-lang.org/t/5734 |
17:23:30 | FromDiscord | <haxscramper> And also manual on destructors https://nim-lang.org/docs/destructors.html |
17:37:16 | alehander92 | hey |
17:37:23 | alehander92 | how do i make testament aware of a new cat |
17:37:26 | alehander92 | like, it seems to work |
17:37:49 | alehander92 | but for some reason my test isn't getting built (??) and i get reExeNotFound |
17:37:59 | alehander92 | but i don't even think I need an exe as I want nim check |
17:43:44 | * | pulux joined #nim |
17:44:59 | pulux | where can I find doc for handling Signals like SIGTERM, SIGUSER1, ...? |
17:46:57 | FromDiscord | <haxscramper> https://nim-lang.org/docs/posix.html#onSignal.t%2Cvarargs%5Bcint%5D%2Cuntyped |
17:50:39 | pulux | ty |
17:58:29 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=2wYk |
18:18:10 | * | disruptek throbs. |
18:21:01 | federico3 | why is it not appearing in the index? |
18:21:05 | federico3 | (and the search) |
18:22:55 | * | ofelas quit (Quit: shutdown -h now) |
18:23:59 | Araq | federico3: we don't index every wrapper that we have |
18:24:23 | Araq | we used to and it was overwhelming. maybe posix.nim should be in there |
18:24:36 | * | ofelas joined #nim |
18:25:03 | Araq | so... my Dictionary concept example works. Now to 'static T' |
18:25:39 | Araq | and then I might add 'requires: compiles(...)' to bring it to feature-parity with the old concepts |
18:27:02 | * | superbia quit (Ping timeout: 258 seconds) |
18:27:08 | disruptek | i couldn't make a `when` in a type section work when used against a `const foo {.booldefine.}`. |
18:27:59 | * | superbia joined #nim |
18:43:23 | * | leorize quit (Ping timeout: 240 seconds) |
18:45:32 | * | leorize joined #nim |
18:47:49 | * | solitudesf quit (Remote host closed the connection) |
18:52:58 | * | maier joined #nim |
18:58:03 | * | maier quit (Ping timeout: 265 seconds) |
19:00:53 | * | disruptek threatens the source. |
19:01:23 | disruptek | Araq: don't be afraid to drop a comment here or there. |
19:02:26 | * | ptdel joined #nim |
19:04:38 | * | gmaggior joined #nim |
19:10:25 | * | Kaivo quit (Ping timeout: 264 seconds) |
19:12:24 | * | Kaivo joined #nim |
19:12:27 | * | apahl quit (Ping timeout: 240 seconds) |
19:13:31 | * | apahl joined #nim |
19:14:44 | federico3 | number of Nim SLOC on my PinePhone: 0 |
19:19:24 | Prestige | need to get those numbers up federico3 |
19:19:32 | federico3 | indeed |
19:26:10 | * | narimiran joined #nim |
19:38:11 | * | a_chou quit (Quit: a_chou) |
19:38:41 | * | a_chou joined #nim |
19:41:06 | * | a_chou quit (Client Quit) |
19:41:29 | * | a_chou joined #nim |
19:56:29 | * | krux02 quit (Remote host closed the connection) |
20:00:57 | * | a_chou quit (Ping timeout: 258 seconds) |
20:02:06 | Araq | disruptek: it's all "immediately obvious" |
20:04:44 | FromDiscord | <haxscramper> Number os SLOC to parse JSON in c++: 18000. 9 template parameters. At some point I was wondering if I'm going to hit template parameter limit on `importcpp` (don't think there any, but still) |
20:05:11 | FromDiscord | <NickSeagull> Is there a way to see what something is expanded to? |
20:05:19 | disruptek | expandMacros from macros module. |
20:05:29 | disruptek | Araq: my ass. |
20:05:43 | FromDiscord | <NickSeagull> Thanks @disruptek |
20:06:00 | Araq | disruptek: ok, how to document it? |
20:06:08 | FromDiscord | <Elegant Beef> You can also expand macros by name in compilation using `--expandMacro:nameOfMacro` |
20:06:23 | disruptek | Araq: just a ## comment per proc is my bare minimum. |
20:06:32 | FromDiscord | <NickSeagull> Awesome @Elegant Beef thanks |
20:06:49 | Araq | disruptek: that's not an answer, it leads to Java-esque comments |
20:06:54 | Araq | proc foobar |
20:07:05 | Araq | ## foos the bar. Bar can be nil. |
20:07:10 | Araq | ^ yay |
20:08:39 | disruptek | when you find a proc that simple, you let me know. |
20:08:54 | * | narimiran quit (Quit: leaving) |
20:08:57 | FromDiscord | <NickSeagull> Araq, disruptek: No idea what you folks are talking about, but I'd say a `runnableExample` at least? |
20:09:15 | disruptek | we're talking about the compiler, so... |
20:09:16 | FromDiscord | <Elegant Beef> Join the club nick, most of the time when they talk i just nod and smile |
20:09:48 | FromDiscord | <NickSeagull> disruptek: Ah, nevermind then, thought you were talking about public-facing API |
20:09:50 | disruptek | Araq: i'm looking at mangler and i have a couple... "mangles the field name, obvs" but generally there's at least something more useful to add. |
20:10:35 | FromDiscord | <NickSeagull> @Elegant Beef I'd like to eventually understand what they talk about, so I can make my way into contributing to the compiler (hopefully, someday) |
20:10:50 | disruptek | this is precisely the point. |
20:11:10 | disruptek | i don't want to have to read /every/ line; in fact, i'd rather just read the comments. |
20:11:40 | disruptek | sometimes you have to write some dumb code and it's nice to explain why to the observer. |
20:12:07 | disruptek | speaking of which, you need to write more comments, rika. |
20:12:34 | FromDiscord | <NickSeagull> disruptek: Sure, but I'd say that all or nothing are not good "dogmas" to follow. It's like, I wouldn't comment `func addOne(x: int): int` the functionality is already in the signature |
20:13:04 | disruptek | take a look at araq's concepts wip pr and see what you think. |
20:13:05 | FromDiscord | <Elegant Beef> Yea if the proc + params explain the proc dont document is a fairly simple arguement |
20:13:11 | disruptek | !pull author:araq concept |
20:13:12 | disbot | https://github.com/nim-lang/Nim/pull/15251 -- 3new-style concepts implemetion, WIP 7& 4 more... |
20:14:24 | Araq | I'm not trying to argue btw, I'm sure the right comments would help you much |
20:14:36 | disruptek | and i don't need to make an argument. |
20:14:47 | disruptek | either people will chip in or they won't. |
20:14:57 | disruptek | either they will be able to contribute, or... not. |
20:15:09 | Araq | but I am not sure what the "right comment" is for the casual compiler developer |
20:15:25 | disruptek | i don't believe this compiler is appropriate for casual development. |
20:15:45 | FromDiscord | <NickSeagull> I see what you mean disruptek. Araq: I've been in both positions and I understand both points |
20:16:06 | FromDiscord | <Elegant Beef> And im just a numpty, so i dont understand any of the code here 😄 |
20:16:21 | disruptek | hey, it's not even 500 lines. surely it's self-evident? |
20:16:29 | disruptek | casual seppuku. |
20:17:03 | FromDiscord | <NickSeagull> Some time ago I was adding a new feature to Eta (which is a Haskell JVM fork) and at first everything was super confusing, but eventually (1 or 2 weeks) everything made sense and it was relatively smooth sailing |
20:17:29 | FromDiscord | <NickSeagull> I'd say that if someone has to take 1 or 2 weeks to learn that, most of them won't contribute, so it'd be nice to lower that barrier ^_^ |
20:17:31 | disruptek | yeah, the compiler made more sense to me when i first started working with it. |
20:17:38 | disruptek | now it makes less sense. |
20:18:20 | FromDiscord | <NickSeagull> I'm not in the position of saying this, but I'd say that a good rule to follow is the boyscout one (or however it's called) leave the place better than when you arrived |
20:18:22 | Araq | you're simply grumpier because the last 10% take 90% of the effort |
20:18:45 | disruptek | if that's true, you'll hear me say "it was easy" once this is done. |
20:20:07 | Araq | yeah, you're known for your optimism |
20:20:16 | alehander92 | i think disruptek started adding comments right |
20:20:20 | disruptek | well, i actually /am/ pretty optimistic. |
20:20:28 | alehander92 | it feels like when people start working with part of the compiler and it clicks for them |
20:20:41 | alehander92 | it can be useful to just comment a bit on something very non-obvious |
20:20:54 | FromDiscord | <NickSeagull> sent a code paste, see https://play.nim-lang.org/#ix=2wZb |
20:21:03 | disruptek | you can read my comments in my pr. it's not fully commented, but i think it's more legible. |
20:21:20 | FromDiscord | <NickSeagull> And how can I do to debug these things when they happen so I don't bother you folks that much? |
20:21:23 | disruptek | i think my code could be maintained by other mortals. |
20:21:26 | alehander92 | or a known stumbling block (of course some people would not need those comments at all, even better for them) |
20:21:58 | Araq | NickSeagull: sorry, cannot help, I don't use the -> syntax |
20:22:22 | disruptek | if you aren't importing sugar, that could be an issue. 😉 |
20:22:29 | FromDiscord | <NickSeagull> I am 🙂 |
20:22:53 | FromDiscord | <haxscramper> Can you show whole error/paste code on playground? |
20:23:06 | FromDiscord | <NickSeagull> @haxscramper lemme try |
20:23:06 | FromDiscord | <haxscramper> Preferrably playground |
20:23:14 | Araq | disruptek: alright, every proc I write will get a ##, it's worth a try |
20:23:24 | Araq | except for when it's super obvious |
20:23:29 | disruptek | Araq: as i said, i don't mind working through stuff and adding comments. |
20:23:40 | * | lritter quit (Ping timeout: 246 seconds) |
20:23:46 | disruptek | it's just, y'know, handy to help me get my bearings. |
20:24:08 | FromDiscord | <Elegant Beef> Nick that code causes me great pain |
20:24:10 | Araq | well I don't see PRs from you adding comments ;-) |
20:24:21 | disruptek | no, because it's work to read this shit. |
20:24:37 | disruptek | i have my own code to try to understand. |
20:25:33 | FromDiscord | <NickSeagull> @Elegant Beef , me too, but I'm just playing with the type system a bit↵↵On it @haxscramper |
20:25:57 | supakeen | где Yardanico? |
20:26:04 | supakeen | Errr, where is. |
20:26:10 | alehander92 | я не знаю! |
20:26:27 | disruptek | !last chucklehead |
20:26:28 | disbot | chucklehead never seen. |
20:26:31 | disruptek | !last yardanico |
20:26:32 | disbot | Yardanico spoke in 12#nim 20 hours ago 12https://irclogs.nim-lang.org/08-09-2020.html#23:47:15 |
20:26:37 | disruptek | oops |
20:26:47 | supakeen | Thank you angry person. |
20:26:57 | FromDiscord | <Rika> lol |
20:27:05 | alehander92 | ~Yardanico |
20:27:18 | disbot | no footnotes for `Yardanico`. 🙁 |
20:27:18 | FromDiscord | <haxscramper> ~disruptek |
20:27:18 | disbot | disruptek: 11a sexy fella with magic hands. |
20:27:18 | disbot | disruptek: 11don't listen to him |
20:27:18 | disbot | disruptek: 11an unsafe nil deref |
20:27:35 | FromDiscord | <Elegant Beef> Im sad that diprustek died |
20:27:46 | FromDiscord | <NickSeagull> Uuuh, @haxscramper got the playground setup, how to share link? ^_^" |
20:27:49 | FromDiscord | <haxscramper> I expected to see "beware of disruptek" |
20:27:57 | alehander92 | ~haxscramper |
20:27:58 | disbot | no footnotes for `haxscramper`. 🙁 |
20:28:00 | FromDiscord | <Elegant Beef> Bottom left corner nick |
20:28:01 | alehander92 | ~Araq |
20:28:01 | disbot | Araq: 11👑Andreas "What Else?" Rumpf👑 |
20:28:05 | alehander92 | dude. |
20:28:10 | alehander92 | ~dom96 |
20:28:10 | disbot | no footnotes for `dom96`. 🙁 |
20:28:10 | FromDiscord | <Elegant Beef> Share to ix |
20:28:15 | alehander92 | ok enough |
20:28:18 | FromDiscord | <NickSeagull> @haxscramper there you go https://play.nim-lang.org/#ix=2wZd |
20:28:19 | disruptek | ~alehander92 |
20:28:19 | disbot | alehander92: 11a simple man |
20:28:21 | FromDiscord | <haxscramper> How do I add footnotes? |
20:28:24 | FromDiscord | <NickSeagull> Thanks @Elegant Beef |
20:28:38 | FromDiscord | <NickSeagull> This one errors differently 🤔 |
20:28:45 | Araq | colors? |
20:28:49 | FromDiscord | <Elegant Beef> *You also dot need to ping every person to thank them 😄 |
20:29:01 | disruptek | ~haxscramper is the second best scramper. |
20:29:02 | disbot | haxscramper: 11the second best scramper. |
20:29:13 | FromDiscord | <Rika> out of two |
20:29:16 | FromDiscord | <NickSeagull> Perhaps because I wrote the case manually instead of using the `match` macro from `patty` |
20:29:37 | FromDiscord | <Rika> current error is different tho |
20:29:38 | FromDiscord | <Rika> `expression expected, but found 'keyword case'`1 |
20:30:16 | FromDiscord | <haxscramper> > @haxscramper there you go https://play.nim-lang.org/#ix=2wZd↵@NickSeagull There is some weird interactions with `=>` and statements, so you just need to wrap whole thing in the `()`. And it is not necessary to assign to `result = ` since fully covered `case` is an expression itself - https://play.nim-lang.org/#ix=2wZe |
20:30:48 | FromDiscord | <Elegant Beef> And ontop of it the lambda functions kill children |
20:30:48 | * | lritter joined #nim |
20:30:49 | * | agent0x00 quit (Ping timeout: 264 seconds) |
20:30:52 | FromDiscord | <Elegant Beef> Little known fact |
20:30:59 | FromDiscord | <Rika> :ThonkDumb: |
20:31:35 | FromDiscord | <Elegant Beef> Rika dont pretend they dont |
20:31:58 | FromDiscord | <NickSeagull> Lambda functions are ❤️ |
20:31:58 | disruptek | lambdas are killing /me/ right now. |
20:32:22 | FromDiscord | <Rika> i have no opinion on lambda functions |
20:32:26 | FromDiscord | <haxscramper> The only downside of `->` is that it creates proc type without `{.noSideEffect.}` annotations |
20:32:55 | * | NimBot joined #nim |
20:33:42 | alehander92 | when you write a test fo rsomething |
20:33:44 | FromDiscord | <haxscramper> !eval import sugar; echo typeof (int -> int) -> (int -> (int -> int)) |
20:33:46 | alehander92 | and you expect to fail |
20:33:46 | NimBot | proc (i0: proc (i0: int): int{.closure.}): proc (i0: int): proc (i0: int): int{.closure.}{.closure.}{.closure.} |
20:33:48 | alehander92 | but .. it works |
20:33:51 | FromDiscord | <NickSeagull> https://play.nim-lang.org/#ix=2wZg |
20:34:02 | alehander92 | and now you're wondering why if you don't support it yet |
20:34:05 | FromDiscord | <NickSeagull> Ok wrote it using my original code, didnt know playground supported packages |
20:34:09 | FromDiscord | <Elegant Beef> They're fine in some places, but they can be abused to make code unreadable. Source: My friend who uses them in his python school work to purposely confuse the teacher if they read the code. |
20:34:22 | FromDiscord | <Elegant Beef> It has some of the popular packages installed |
20:34:26 | FromDiscord | <haxscramper> I meaan, what's wrong with this? I write it all the time and feel perfectly OK about 0% of the time |
20:35:24 | FromDiscord | <NickSeagull> is there a way to see what is going on with the template expansion in my code? |
20:35:40 | FromDiscord | <Elegant Beef> expand macro not work? |
20:35:40 | FromDiscord | <NickSeagull> It now complains about that it expects parens, etc. But no idea whats going on |
20:35:50 | FromDiscord | <NickSeagull> Uuuh, lemme try, thought that was for macros only |
20:36:00 | FromDiscord | <Elegant Beef> i mean i dont know, which is why i asked |
20:36:00 | FromDiscord | <Rika> templates are technically simpler macros |
20:37:04 | FromDiscord | <NickSeagull> Ok so apparently the thing fails to parse completely, therefore no macro expansion |
20:37:05 | FromDiscord | <NickSeagull> wut |
20:37:41 | FromDiscord | <haxscramper> https://play.nim-lang.org/#ix=2wZj just add `block` and wrapping `()` until it works |
20:38:01 | FromDiscord | <NickSeagull> waaaat? o_o |
20:38:36 | FromDiscord | <NickSeagull> Thanks brw |
20:38:38 | FromDiscord | <NickSeagull> (edit) 'brw' => 'btw' |
20:40:50 | FromDiscord | <NickSeagull> That's half of how one proves that `a^b * a^c = a^(b+c)` by using only types, if someones curious lol |
20:42:41 | FromDiscord | <Elegant Beef> i just replace a,b,c for 1s and get the answer |
20:42:45 | FromDiscord | <Elegant Beef> 😄 |
20:43:16 | FromDiscord | <NickSeagull> It's a proof @Elegant Beef not an equation solving 😅 |
20:43:27 | FromDiscord | <NickSeagull> I mean |
20:43:28 | FromDiscord | <Elegant Beef> Mine's also a proof |
20:43:35 | FromDiscord | <Elegant Beef> It's a proof that it works for 1 |
20:43:48 | FromDiscord | <NickSeagull> 🎩 |
20:44:02 | alehander92 | oh man |
20:44:02 | FromDiscord | <NickSeagull> I can't say anything else towards that truth 😂 |
20:44:13 | alehander92 | prove the collatz conjecture :D |
20:44:57 | FromDiscord | <NickSeagull> I'm still in the basics of this alehander92 😅 |
20:45:24 | FromDiscord | <NickSeagull> And I'm not sure if it is possible, given that the equivalence with types is with logic and basic algebra |
20:45:49 | Araq | disruptek: here you go, https://github.com/nim-lang/Nim/pull/15251/commits/8033e635237cac3c30951cf9d514a9e20b328bb6 |
20:45:50 | disbot | ➥ new-style concepts implemetion, WIP |
20:46:18 | Araq | if it helps, I will try to do the same for every new code I write |
20:46:42 | disruptek | that's pretty great, dude, thank you. |
20:47:02 | FromDiscord | <NickSeagull> Wow thats awesome Araq |
20:47:38 | alehander92 | cool! |
20:53:48 | * | maier joined #nim |
20:54:07 | bozaloshtsh | yes, having comments like these make hacking around in the compiler 1000% more inviting |
20:57:20 | disruptek | that's the case for all code, honestly. |
20:57:49 | FromDiscord | <Elegant Beef> 10 minutes of documentation saves the next programmers hairline |
20:57:58 | supakeen | Too late. |
20:58:13 | disruptek | i had almost no comments on testes because, frankly, i've already had so many comments on them that i really couldn't think of anything new to add. |
20:58:18 | FromDiscord | <Elegant Beef> Saves the next programmer from heart conditions* |
20:59:01 | * | maier quit (Ping timeout: 264 seconds) |
20:59:10 | disruptek | but i think even more people are going to be exposed to my testes, so lately i started adding comments again. |
20:59:31 | FromDiscord | <Elegant Beef> Yea gotta keep it groomed if you're showing it off |
21:03:49 | * | Kaivo quit (Ping timeout: 264 seconds) |
21:05:51 | * | Kaivo joined #nim |
21:07:05 | * | audiofile joined #nim |
21:11:59 | * | a_chou joined #nim |
21:17:30 | * | krux02 joined #nim |
21:17:49 | * | superbia quit (Quit: WeeChat 2.9) |
21:20:36 | FromGitter | <awr1> heyo |
21:20:59 | FromGitter | <awr1> question: did tables.withValue() get broken or am i just not using it right |
21:21:13 | FromGitter | <awr1> https://play.nim-lang.org/#ix=2wZF |
21:22:26 | FromGitter | <awr1> or are you actually supposed to declare a value variable beforehand |
21:23:12 | * | solitudesf joined #nim |
21:23:56 | FromDiscord | <Rika> map isnt a table |
21:24:09 | FromGitter | <awr1> oh i forgot toTable |
21:24:35 | FromDiscord | <Rika> then you have to dereference value too because its a weird tempate |
21:24:38 | FromDiscord | <Rika> (edit) 'tempate' => 'template' |
21:24:58 | FromGitter | <awr1> sounds like a weird API |
21:25:22 | FromGitter | <awr1> https://github.com/nim-lang/Nim/blob/217675cf84dc47bb68f03b341aff14315804efec/lib/pure/collections/tables.nim#L588 |
21:25:53 | FromDiscord | <Rika> you wouldnt be able to modify the value otherwise |
21:26:21 | FromDiscord | <Rika> (i think?) |
21:26:24 | FromGitter | <awr1> why is the value injected |
21:27:05 | FromDiscord | <Rika> otherwise it would be gensymmed |
21:29:40 | * | tane quit (Quit: Leaving) |
21:32:08 | FromGitter | <awr1> i'm not sure what the purpose of not gensyming it here is though, since inject just exposes things to the outer scope? after the body gets expanded the body should be able to access `value` just fine. |
21:34:51 | * | krux02 quit (Remote host closed the connection) |
21:35:14 | FromGitter | <awr1> either way the doc is not clear that the value is a raw ptr |
21:35:27 | FromDiscord | <Rika> yeah |
21:37:49 | disruptek | leorize: when gotodef works in the compiler, it's a thing of beauty. |
22:00:49 | * | haxscramper quit (Remote host closed the connection) |
22:05:48 | * | sacredfrog quit (Quit: ZNC 1.8.1 - https://znc.in) |
22:06:08 | FromDiscord | <Rebel> Has anyone had success doing cross compilation for Windows on Linux using the MinGW-w64 toolchain. I followed what the documentation does and that did not work as it errors out saying windows.h does not exist when it does. |
22:06:57 | solitudesf | all i had to do is install mingw and compile with -d:mingw |
22:07:13 | FromDiscord | <Rebel> ok |
22:07:24 | FromDiscord | <Rebel> did your code do anything with windows? Like using the windows API |
22:07:46 | FromDiscord | <Rebel> (edit) 'did your code do anything with windows? Like using the windows API ... ' => 'did your code do anything with windows? Like using the windows APIor importc from windows.h?' |
22:07:58 | solitudesf | it wasnt my code, so who knows |
22:09:14 | FromDiscord | <Rebel> bruh |
22:11:01 | * | lritter quit (Quit: Leaving) |
22:19:17 | FromDiscord | <Varriount> @Rebel if your compiler can't find Windows.h, you probably need to modify Nim.cfg |
22:19:36 | disruptek | probably just need to reinstall windows. |
22:19:57 | FromDiscord | <Rebel> I'm not on Windows lol |
22:20:00 | FromDiscord | <Rebel> it's a docker container |
22:20:05 | disruptek | there's your problem, right there. |
22:20:45 | FromDiscord | <Rebel> I installed mingw-w64 and am doing --d:mingw |
22:21:17 | FromDiscord | <Varriount> And? |
22:22:10 | FromDiscord | <Rebel> it crashes during compilation saying fatal error can't find windows.h |
22:22:21 | FromDiscord | <Varriount> @Rebel If you want to cross-compile a C file, what command do you use? |
22:23:26 | FromDiscord | <Rebel> https://media.discordapp.net/attachments/371759389889003532/753380067077390446/unknown.png |
22:24:45 | FromDiscord | <Rebel> I usually just use wclang |
22:24:46 | FromDiscord | <Varriount> Ok. What happens if you try to cross-compile a C file that includes windows.h? |
22:24:55 | * | a_chou quit (Ping timeout: 265 seconds) |
22:25:28 | * | solitudesf quit (Ping timeout: 258 seconds) |
22:26:36 | FromDiscord | <Rebel> not too sure tbh I usually just use wclang and don't have to compile Windows on Linux too often. If anything I just use VS and let that do all the hard work for me. |
22:31:04 | FromDiscord | <Varriount> Try adding that last include path to the CPATH environment variable. `CPATH=$CPATH:/usr/x86_64-w64-mingw32/include/ ; export CPATH` |
22:32:00 | FromDiscord | <Varriount> And then invoke the Nim compiler with the mingw symbol defined. |
22:32:28 | * | arecacea1 quit (Read error: Connection reset by peer) |
22:32:57 | * | arecacea1 joined #nim |
22:33:48 | FromDiscord | <Varriount> If you can verify whether basic cross-compilation is working using a regular C file, then we will know that it's not the C compiler tool chain setup. |
22:34:50 | FromDiscord | <Varriount> @Rebel ^ |
22:38:18 | FromDiscord | <Varriount> I'm going to go take a nap now. I suspect this is an environment issue. |
22:38:55 | FromDiscord | <Varriount> Perhaps we should just have docker images with all this stuff prepackaged |
22:44:15 | * | ptdel quit (Read error: Connection reset by peer) |
22:47:28 | * | natrys quit (Quit: natrys) |
22:54:45 | * | maier joined #nim |
23:00:12 | * | maier quit (Ping timeout: 265 seconds) |
23:00:59 | * | a_chou joined #nim |
23:15:12 | * | abm joined #nim |
23:32:03 | * | gmaggior quit (Quit: Leaving) |
23:38:19 | * | lbart quit (Read error: Connection reset by peer) |
23:46:56 | FromDiscord | <tomck> sent a code paste, see https://play.nim-lang.org/#ix=2x0s |
23:49:27 | * | lbart joined #nim |
23:49:27 | * | lbart quit (Changing host) |
23:49:27 | * | lbart joined #nim |
23:56:38 | FromDiscord | <Varriount> @dom96 ^ |
23:58:50 | * | Jesin quit (Quit: Leaving) |