00:13:38 | FromDiscord | <zidsal> @dom96 not sure how I missed that nice spot |
00:14:27 | FromDiscord | <zidsal> oh wait I didn't miss that you've made that change |
00:25:19 | * | tane quit (Quit: Leaving) |
01:45:14 | FromDiscord | <Cohjellah> Haven't been in here in a while |
01:45:24 | FromDiscord | <Cohjellah> Kings :nim1: |
01:45:37 | FromDiscord | <Cohjellah> How's Nim travelling these days? |
01:51:05 | FromDiscord | <ElegantBeef> Digitally as always |
01:53:29 | * | njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
01:53:53 | * | njoseph joined #nim |
01:58:34 | * | Gustavo6046 quit (Quit: ZNC 1.8.2 - https://znc.in) |
01:59:20 | * | Gustavo6046 joined #nim |
03:16:38 | * | wasted_youth quit (Quit: Leaving) |
03:43:32 | * | abm quit (Read error: Connection reset by peer) |
03:59:59 | * | vicfred quit (Quit: Leaving) |
04:00:26 | FromGitter | <offbeat-stuff> Hi trying pass varargs to template |
04:00:36 | FromGitter | <offbeat-stuff> Here is the code |
04:00:37 | FromGitter | <offbeat-stuff> https://play.nim-lang.org/#ix=2Otv |
04:01:05 | * | vicfred joined #nim |
04:06:28 | FromDiscord | <ElegantBeef> I believe you need to use `macros.unpackvarargs` |
04:08:12 | FromGitter | <offbeat-stuff> can you show an example |
04:09:30 | * | irchaxwell_ quit (Read error: Connection reset by peer) |
04:09:42 | FromDiscord | <ElegantBeef> What's the issue currently? |
04:11:08 | FromGitter | <offbeat-stuff> Well, As you can see in code I want to pass a variables to a template and want their sizeof() and addr |
04:11:34 | FromDiscord | <ElegantBeef> Well they're untyped so i dont think this will work |
04:11:36 | FromGitter | <offbeat-stuff> I would use a proc but they are untyped |
04:11:59 | FromGitter | <offbeat-stuff> So what would a macro look like for it |
04:12:32 | FromGitter | <offbeat-stuff> On idividual level they will be opengl byte,bool,float,int |
04:21:17 | FromDiscord | <ElegantBeef> I dont know if there is a better way, but this puts you most of the way there https://play.nim-lang.org/#ix=2OtB |
04:22:06 | FromGitter | <offbeat-stuff> Thanks |
04:23:14 | FromDiscord | <ElegantBeef> I guess it isnt hmm really |
04:24:28 | FromDiscord | <ElegantBeef> This might do the trick, but yea really depends on the arguments you pass https://play.nim-lang.org/#ix=2OtD |
04:26:07 | FromGitter | <offbeat-stuff> Thanks this one worked super |
04:26:49 | FromDiscord | <ElegantBeef> Yay! |
04:27:39 | FromGitter | <offbeat-stuff> Btw am using compute shaders with raylib so had to make some functions to create ssbos |
04:27:49 | FromGitter | <offbeat-stuff> This was the mainone |
04:50:07 | * | spiderstew_ joined #nim |
04:52:36 | * | spiderstew quit (Ping timeout: 240 seconds) |
04:57:26 | * | irchaxwell joined #nim |
05:00:55 | irchaxwell | Is it possible to use variables in heredoc? |
05:01:27 | FromDiscord | <ElegantBeef> heredoc? |
05:01:51 | FromDiscord | <ElegantBeef> Seems that's a name for multiline string literals? |
05:02:24 | FromDiscord | <ElegantBeef> !eval import strformat;let a = 100; echo fmt""" Hello all {a} nim users""" |
05:02:28 | NimBot | Hello all 100 nim users |
05:03:16 | FromDiscord | <ElegantBeef> !eval import strformat;let a = 100 echo "Hello all $1 nim users" % a |
05:03:18 | NimBot | Compile failed: /usercode/in.nim(1, 60) Error: undeclared identifier: '%' |
05:03:27 | FromDiscord | <ElegantBeef> Shit that's strutils isnt it! |
05:04:00 | FromDiscord | <ElegantBeef> !eval import strutils;let a = 100 echo """Hello all $1 nim users""" % a |
05:04:02 | irchaxwell | That's right, multiline string. |
05:04:05 | NimBot | Compile failed: /usercode/in.nim(1, 65) Error: undeclared identifier: 'a' |
05:04:12 | FromDiscord | <ElegantBeef> God damn it! ๐ |
05:04:25 | Prestige | hah. |
05:04:29 | Prestige | Hey Beef |
05:04:33 | FromDiscord | <ElegantBeef> Well anyway you have your answer use `strformat.fmt` or `strutils.%` |
05:04:48 | FromDiscord | <ElegantBeef> Uh oh prestige is here, going to suggest MI again, time to smokebomb |
05:04:50 | FromDiscord | <ElegantBeef> Hello |
05:05:48 | Prestige | INHERITANCE |
05:05:54 | Prestige | Sup man how's it going |
05:05:58 | FromDiscord | <ElegantBeef> Want your inheritance kill your parents |
05:06:12 | Prestige | I don't need $5 |
05:06:27 | FromDiscord | <ElegantBeef> I'm fine, avoiding developing my game apparently |
05:06:30 | FromDiscord | <Rika> bruh |
05:06:38 | FromDiscord | <ElegantBeef> What? |
05:06:38 | Prestige | Oh you're making a game? Neat |
05:06:50 | FromDiscord | <ElegantBeef> How have you not seen me spamming the link to it? ๐ |
05:07:02 | FromDiscord | <ElegantBeef> Pmunch seems to love playing it |
05:07:04 | Prestige | I don't think I have haha, been too busy writing code recently |
05:09:42 | FromDiscord | <ElegantBeef> What've you been working on? |
05:09:45 | FromDiscord | <ElegantBeef> Nimdow 2.0? ๐ |
05:10:23 | Prestige | Haha well I've been thinking about Nimdow's architecture a lot, but I've been working on a gym management system (website & rest api server) in typescript |
05:10:46 | Prestige | wanted to write the server in Nim at first but the tooling seemed lacking. Going to try selling this when it's ready |
05:11:41 | FromDiscord | <ElegantBeef> Wow, cant believe you'd say that |
05:12:13 | Prestige | yeah :/ |
05:13:20 | FromDiscord | <ElegantBeef> I totally dont have a problem that whenever i'm not writing nim i wish i was writing nim |
05:13:45 | Prestige | I do, but I think TS is the closest I can be to Nim without being upset lol |
05:14:10 | Prestige | I tried writing Java a few months ago and wanted to die |
05:14:28 | Prestige | (I used to write Java professionally) |
05:14:31 | FromDiscord | <ElegantBeef> I wrote some python earlier just to show how to clean someones basic code up and i kept leaving off the `()` on function calls |
05:14:49 | FromDiscord | <ElegantBeef> It's so weird to go to a place without that feature |
05:15:44 | FromDiscord | <ElegantBeef> What was nim lacking anyway? |
05:16:41 | Prestige | So I was looking at jester but I think it's not stable yet, and is dealing with some bug with the framework it uses. That was my biggest concern |
05:16:46 | FromDiscord | <Rika> nim's http servers are a bit too simple and wonky and inconsistent |
05:17:22 | FromDiscord | <ElegantBeef> Yea i've never touched web dev so i've looked at the backends and go "yep seems to work" |
05:17:54 | FromDiscord | <ElegantBeef> I do know jester has an issue with httpbeast, but it does have a work around |
05:22:18 | FromDiscord | <ElegantBeef> Is it actually not considered stable, both the nimble directory and playground use jester? |
05:26:11 | * | dv^_^9691 joined #nim |
05:27:23 | Prestige | I assume it's not stable because it hasn't reached 1.0, I don't want breaking changes on updates |
05:28:25 | * | Jesin quit (Ping timeout: 276 seconds) |
05:28:49 | * | Jesin joined #nim |
05:29:04 | * | dv^_^969 quit (Ping timeout: 276 seconds) |
05:35:14 | * | leorize quit (Ping timeout: 268 seconds) |
05:37:19 | * | leorize joined #nim |
05:39:51 | FromDiscord | <ElegantBeef> Just ask dom for a pinky promise ๐ |
05:44:26 | * | xet7 joined #nim |
05:46:09 | * | Tlangir quit (Ping timeout: 264 seconds) |
06:02:59 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
06:03:37 | * | Xatenev joined #nim |
06:06:35 | Prestige | Haha |
06:08:11 | leorize[m] | use flywind's prologue |
06:08:21 | leorize[m] | that stuff is actively developed |
06:09:15 | * | Xatenev left #nim (#nim) |
06:16:31 | * | pbb quit (Remote host closed the connection) |
06:17:47 | * | pbb joined #nim |
06:29:31 | Prestige | looks interesting |
06:34:34 | Prestige | oh also other stuff I would need: libs to interact with postgres and redis, ability to mock things for tests, type validation on incoming json (with types in my code) etc. Haven't looked into any of these, just don't know if they are available and mature |
06:39:55 | * | Tanger joined #nim |
06:46:29 | * | zedeus quit (Ping timeout: 256 seconds) |
07:57:02 | * | xet7 quit (Quit: Leaving) |
08:03:54 | * | xet7 joined #nim |
08:05:13 | * | wasted_youth joined #nim |
08:17:00 | FromDiscord | <Dav1ss> Is nim convenient for making APIs or backends? |
08:17:07 | FromDiscord | <Dav1ss> (edit) "nim" => "Nim" |
08:18:42 | FromDiscord | <Avatarfighter> Could somebody look over my proc and let me know if there are things I can improve upon ? https://play.nim-lang.org/#ix=2Oua |
08:20:01 | FromDiscord | <ElegantBeef> I think Nim would be |
08:20:23 | FromDiscord | <ElegantBeef> line 41 can be `result.valid = attribute in possibleAttributes` |
08:20:58 | FromDiscord | <Avatarfighter> nice catch |
08:21:05 | FromDiscord | <Avatarfighter> I fully skipped over that lol |
08:21:35 | FromDiscord | <ElegantBeef> God dammit, now i've gotta ad a few more things to my `strviewutils` package ๐ |
08:21:36 | FromDiscord | <Avatarfighter> I think I can also yeet the pragma |
08:21:46 | FromDiscord | <Avatarfighter> Like what ๐ |
08:21:51 | FromDiscord | <ElegantBeef> `startsWith` |
08:21:59 | FromDiscord | <Avatarfighter> its in stdlib |
08:22:13 | FromDiscord | <Avatarfighter> What is your strviewutils package ? |
08:22:36 | FromDiscord | <ElegantBeef> It's strutils operations but without the reallocations with things like `split` |
08:22:43 | FromDiscord | <Avatarfighter> ooo |
08:22:45 | FromDiscord | <Avatarfighter> Got a link ? |
08:22:54 | FromDiscord | <ElegantBeef> https://github.com/beef331/strviewutils |
08:23:11 | FromDiscord | <ElegantBeef> Think it fails if not using Arc/Orc |
08:23:31 | FromDiscord | <Avatarfighter> Neat |
08:23:44 | FromDiscord | <Avatarfighter> What are views ? |
08:24:04 | FromDiscord | <ElegantBeef> Nim's experimental borrowing features |
08:24:20 | FromDiscord | <ElegantBeef> well i guess `lent` isnt experimental |
08:24:26 | FromDiscord | <Avatarfighter> What does it do ? I genuinely didn't know we had something new lol |
08:24:56 | FromDiscord | <ElegantBeef> It allows you to store `openArray[T]` and `var T` into variables on the fly borrowing the original |
08:25:17 | FromDiscord | <Avatarfighter> oh whaaat thats good ' |
08:25:39 | FromDiscord | <ElegantBeef> So in my case instead of `seq[string]` i do `seq[openArray[char]]` which is where that bit of speed comes from |
08:26:07 | FromDiscord | <Avatarfighter> thats kind of funny ngl |
08:26:08 | FromDiscord | <ElegantBeef> It doesnt duplicate the memory, and doesnt need to allocate new strings, so both good for memory and sppeeeeed |
08:26:11 | FromDiscord | <Rika> why strviewutils and not strviewtils lol |
08:26:20 | FromDiscord | <Avatarfighter> ^ |
08:26:23 | FromDiscord | <Rika> im joking |
08:26:40 | FromDiscord | <Avatarfighter> i support your innovational name |
08:28:48 | FromDiscord | <ElegantBeef> Also use `Option[Cookie]` instead of `result.value` |
08:29:14 | FromDiscord | <ElegantBeef> That way whenever you have an issue you just o `return none(Cookie)` and not have to remember to set that `valid = false` |
08:29:45 | FromDiscord | <ElegantBeef> Although we could remove a lot of these results |
08:29:47 | FromDiscord | <ElegantBeef> (edit) "results" => "returns" |
08:33:09 | FromDiscord | <ElegantBeef> Oh shit line 41 is just completely redundant |
08:33:50 | FromDiscord | <ElegantBeef> you could just set it to true, then have the case statement set it after since you do that anyway ๐ |
08:35:09 | * | vesper11 joined #nim |
09:30:42 | * | narimiran joined #nim |
09:30:55 | * | narimiran quit (Remote host closed the connection) |
09:40:24 | * | superbia joined #nim |
09:41:58 | * | haxscramper joined #nim |
09:51:39 | * | vesper11 quit (K-Lined) |
09:57:13 | * | krux02 joined #nim |
10:36:05 | * | superbia quit (Quit: WeeChat 3.0) |
10:48:11 | FromGitter | <offbeat-stuff> undeclared field: 'GLuint' for type easygl.ShaderProgramId [type declared in /home/kai/.nimble/pkgs/easygl-0.1.1/easygl.nim(9, 5)] |
10:48:18 | FromGitter | <offbeat-stuff> My computer is drunk |
10:48:31 | FromGitter | <offbeat-stuff> I am just type casting there |
10:49:05 | FromGitter | <offbeat-stuff> Maybe It's too sleepy because of the overdose of compute shaders I gave it |
10:49:38 | FromDiscord | <Rika> Let it sleep geez |
10:50:18 | FromGitter | <offbeat-stuff> But seriously This shouldn't occur right |
10:50:34 | FromGitter | <offbeat-stuff> ShaderProgramId = distinct GLuint |
10:52:03 | ForumUpdaterBot | New thread by HJarausch: Generic functions : syntax / deduction / debugging, see https://forum.nim-lang.org/t/7480 |
10:55:12 | FromDiscord | <Rika> Is GLuint exported |
11:03:47 | * | letto quit (Quit: Konversation terminated!) |
11:07:44 | * | vicfred quit (Quit: Leaving) |
11:08:29 | * | letto joined #nim |
11:23:30 | * | xet7 quit (Quit: Leaving) |
11:25:09 | * | Productive2 quit (Quit: Leaving.) |
11:43:43 | * | PMunch joined #nim |
11:46:10 | PMunch | Hello everyone :) |
12:02:48 | FromDiscord | <dom96> hello hello |
12:05:24 | PMunch | Had a look at the FOSDEM schedule? |
12:17:27 | FromDiscord | <carpal> ... what do all that reaction stickers mean ๐? |
12:18:24 | FromDiscord | <carpal> (edit) "that" => "those" |
12:18:45 | FromDiscord | <dom96> https://github.com/nim-lang/RFCs/issues/337 |
12:22:02 | FromDiscord | <haxscramper> For my docgen I just planned to hardcode list of compiler defines and add heuritics based on that |
12:22:20 | FromDiscord | <Rika> Are there uses for defined other than for when branches |
12:22:25 | FromDiscord | <haxscramper> And there is also a murky territory of `-d:nodejs` etc. |
12:23:19 | FromDiscord | <haxscramper> Actually not, scratch that, userDefined == passed as `-d` to compiler, so this is mostly clear |
12:24:08 | FromDiscord | <raymanlib> Is it possible to recreate the turbo vision look with nim? https://media.discordapp.net/attachments/371759389889003532/807587426137669632/turbovision.jpg |
12:25:31 | FromDiscord | <Rika> I donโt see why not |
12:26:05 | PMunch | @raymanlib, sure, why wouldn't it? |
12:29:53 | FromDiscord | <Ardek> you could use the `terminal` stdlib |
12:32:08 | FromDiscord | <haxscramper> Or https://github.com/johnnovak/illwill |
12:35:40 | FromDiscord | <raymanlib> I don't even know where to start with making a borland like text editor/IDE. How should I start? Make a simple box first? |
12:45:02 | FromDiscord | <Ardek> define functions for drawing primitives |
12:45:40 | FromDiscord | <Ardek> and GUI elements |
12:48:05 | * | abm joined #nim |
12:49:46 | * | fredrikhr joined #nim |
12:51:21 | FromDiscord | <raymanlib> Code is just overwhelming at times. How do you guys deal with that? |
12:52:59 | FromDiscord | <Rika> do it part by part |
12:53:08 | FromDiscord | <Rika> dont implement everything as soon as you think of it |
12:54:30 | * | spiderstew joined #nim |
12:55:15 | * | spiderstew_ quit (Ping timeout: 258 seconds) |
13:01:07 | PMunch | Nonono @Rika, the best way to do it is spec everything out first. Then slowly bake more and more and more stuff into your spec until your project is unimaginably complex and difficult. Then slowly lose interest because you have no idea where to start and no matter how much work you do you will never get to where you wanted. Then drop the entire thing, voila, you didn't have to code anything at all! |
13:01:08 | PMunch | :P |
13:01:23 | FromDiscord | <Rika> lol |
13:01:29 | FromDiscord | <haxscramper> I prefer to just look at the sceen until it looks back at me |
13:01:33 | FromDiscord | <Rika> when i think of an idea i write it on my whiteboard |
13:01:33 | FromDiscord | <haxscramper> Works most of the time |
13:04:06 | FromDiscord | <Ardek> when i think of an idea i forget it when i think of the implementation |
13:04:17 | FromDiscord | <Rika> thats why i have the whiteboard |
13:05:40 | FromDiscord | <carpal> is pointers size 4 bytes also on x64 in nim? |
13:06:06 | FromDiscord | <Rika> i believe any pointer is 64bit on a 64bit computer |
13:06:57 | PMunch | Yup |
13:07:05 | PMunch | That's kinda what it means.. |
13:07:39 | PMunch | I have a folder called "Ideas" where I create text documents to write down ideas I have |
13:07:50 | PMunch | Either there or in my notebook that I carry with me everywhere |
13:08:41 | FromDiscord | <dk> do you ever read them? ๐ค |
13:09:23 | FromDiscord | <Rika> the whiteboard thing is nice too, means you cant work on another project without finishing the old one lol |
13:10:24 | PMunch | From time to time, yea |
13:12:52 | FromDiscord | <carpal> me too, I asked before a few days ago I was asking for something similar and someone said me a pointer in nim weighs 4 bytes also on x64.... |
13:13:14 | FromDiscord | <Rika> well yes, literally anywhere it is like that |
13:13:30 | FromDiscord | <Rika> on a 32 bit machine pointers are 32 bit, 64 on 64, etc |
13:15:34 | FromDiscord | <carpal> I mean that person said me a pointer in nim weighs 32 bit both on x32 and x64 |
13:15:41 | federico3 | unless you are running 32bit executables on a 64bit CPU... |
13:19:28 | FromDiscord | <Rika> well i'd say that its still running on a 32bit machine |
13:19:35 | FromDiscord | <Rika> though not the physical machine |
13:19:48 | FromDiscord | <haxscramper> @mratsim I've done some digging on dependency resolution (though my level of expertise in SAT-solver-related field can only be described as non-existent at best), and found a paper that I think might be adopted to our use case |
13:20:02 | FromDiscord | <haxscramper> Together with construction of explicit dependency graph, which is a must |
13:20:28 | FromDiscord | <mratsim> You probably know more than me on graphs and SAT now then ๐ |
13:20:50 | * | PMunch quit (Quit: leaving) |
13:20:51 | * | xet7 joined #nim |
13:21:10 | FromDiscord | <haxscramper> Though I stumbled upon a problem described in top comment here - https://old.reddit.com/r/programming/comments/45ftk1/so_you_want_to_write_a_package_manager/ that I don't know how to address yet |
13:22:45 | * | PMunch joined #nim |
13:23:08 | FromDiscord | <haxscramper> Says person who has a repo named "Parametric Integer Linear Programming Solver and Polyhedral compilation backend" |
13:24:40 | FromDiscord | <haxscramper> (well at least I suppose it is related because you linked it) |
13:25:18 | FromDiscord | <mratsim> There is a field called "constraint programming", to find solutions according to constraints. |
13:25:38 | FromDiscord | <mratsim> It is used for example to schedule classes, or nuclear maintenance |
13:25:54 | FromDiscord | <mratsim> depending on team availability and reactors that can be stopped and when. |
13:26:13 | FromDiscord | <mratsim> constraint programming is an alternative to SAT that can solve dependencies constraints |
13:26:49 | FromDiscord | <mratsim> And I said it's an alternative that is a dead-end for us because we would be the first to use that for dependency resolution |
13:26:50 | * | superbia joined #nim |
13:27:08 | FromDiscord | <mratsim> while Z3 and libsolve are pretty mature and have been used before |
13:27:23 | FromDiscord | <mratsim> libsolv being even tuned for dependency resolution so you can even forget about all math |
13:28:39 | FromDiscord | <mratsim> that's an interesting link you found. |
13:28:48 | FromDiscord | <mratsim> can be added as references to the thread |
13:29:19 | FromDiscord | <mratsim> This problem reminds me of nqueens with backtracking needed. |
13:29:32 | FromDiscord | <haxscramper> done |
13:30:09 | FromDiscord | <mratsim> https://en.opensuse.org/openSUSE:Libzypp_satsolver this might be libsolv since it's also opensuse |
13:30:31 | FromDiscord | <haxscramper> And about z3 vs libsolv - I personally only looked into z3 for now, because it looks like it has more advantages, at least at first glance wrt. to long-term gains |
13:30:42 | FromDiscord | <haxscramper> Though personal interest also plays a role here |
13:31:10 | FromDiscord | <mratsim> I have no horse there |
13:31:38 | FromDiscord | <mratsim> pragmatic is libsolve but we will end up using Z3 at one point for other needs so .... |
13:31:57 | FromDiscord | <haxscramper> yes, that's close to what I think too |
13:31:58 | FromDiscord | <mratsim> more people aware of just building it can only help @Araq |
13:32:49 | FromDiscord | <haxscramper> For now I need to address this first, and have some kind of coherent vision wrt. to how this could be implemented |
13:34:34 | FromDiscord | <mratsim> maybe we can have a library for dependency resolution, separate from nimble |
13:34:46 | FromDiscord | <mratsim> then we can have nimble call it |
13:34:59 | FromDiscord | <mratsim> or any alternative package manager people are starting to build |
13:35:01 | FromDiscord | <haxscramper> yes, that is a good idea |
13:35:17 | FromDiscord | <mratsim> nimble.directory can also use it. |
13:35:18 | FromDiscord | <haxscramper> I strongly support pushing all non-trivial parts into separate libraries |
13:36:44 | FromDiscord | <mratsim> @dom96 thoughts? ^ |
13:38:01 | FromDiscord | <Rika> imo that sounds nice |
13:39:03 | federico3 | @mratsim for what purpose on nimble.directory? |
13:39:21 | FromDiscord | <mratsim> maybe you want to display the graph of dependency visually |
13:39:30 | FromDiscord | <mratsim> (edit) "dependency" => "dependencies" |
13:39:55 | FromDiscord | <mratsim> all tooling around packages basically might be able to benefit from this |
13:41:47 | federico3 | (hence my points on the github issue) |
13:48:09 | * | Productive2 joined #nim |
13:48:46 | * | Productive2 quit (Quit: Leaving) |
14:04:04 | FromDiscord | <haxscramper> I realized is quite close to "rewrite libsolv in nim" |
14:04:19 | FromDiscord | <mratsim> it can be wrap |
14:04:39 | FromDiscord | <mratsim> libsolv or Z3 |
14:04:52 | * | tane joined #nim |
14:05:18 | FromDiscord | <haxscramper> Yes, though I meant that we can look into how libsolv implemented and base our solution on this |
14:05:44 | FromDiscord | <haxscramper> Or make abstracted API and then it doesn't really matter |
14:08:33 | FromDiscord | <mratsim> from experience, the best way to go about implementing math heavy library is to start with a wrapper, creat test cases on top just to make sure we wrapped correctly. And then if we want to reimplement, reuse the same test cases. |
14:08:51 | FromDiscord | <mratsim> that gives a test suite, experience in the API strengths and limitations. |
14:09:20 | FromDiscord | <mratsim> it's likely that when debugging you will want to debugEcho in the original lib also. |
14:44:26 | FromDiscord | <dom96> @mratsim sure |
14:47:16 | FromDiscord | <dom96> Personally I'd love to see how far we can take the naive approach. I think a lot of the problems with Nimble's current dependency resolution is that Nimble doesn't have a clear idea of the full dependency tree upfront. I don't think a SAT solver helps here either, it's a side effect of Nimble's decentralised design. |
14:47:42 | FromDiscord | <mratsim> it's a NP complete problem |
14:47:43 | FromDiscord | <dom96> So to get a SAT solver to work we would need to solve that problem first anyway |
14:48:16 | FromDiscord | <mratsim> you can do heuristics sure, and given the current Nim ecosystem they might be suffucient |
14:49:07 | FromDiscord | <mratsim> but in that case you still need a test suite that tests various dependency constraints. |
14:50:25 | FromDiscord | <dom96> Yep, writing these tests has always been a pain. I think a framework that gets rid of a lot of the boilerplate would help a lot. |
14:50:41 | FromDiscord | <dom96> That way we can quickly model the bugs and add them to the test suite |
14:50:59 | FromDiscord | <dom96> Right now it requires creating dummy Nimble packages which gets old quickly |
14:51:21 | FromDiscord | <haxscramper> https://news.ycombinator.com/item?id=21696363 - about necessity of SAT solvers |
14:51:47 | FromDiscord | <haxscramper> Good response, specifically part aboutโต> nstead of manually adding heuristics everytime a user files a GitHub issue. |
14:52:01 | FromDiscord | <dom96> > The naive exponential algorithm is fine, and it leads to more maintainable and understandable code. |
14:52:05 | FromDiscord | <haxscramper> And there are number of github issues already |
14:52:11 | FromDiscord | <dom96> That's exactly my feeling too |
14:52:23 | FromDiscord | <dom96> and now that pcwalton shares it I'm inclined to believe it even more ๐ |
14:52:25 | FromDiscord | <haxscramper> And who is going to patch this heuristics? |
14:54:05 | FromDiscord | <haxscramper> SAT is a kill-all approach I believe, and right now I don't exactly see any explicit dependency resolution at all - though the part I linked in my comment https://github.com/nim-lang/nimble/issues/890#issuecomment-774476074 might not be related |
14:54:21 | FromDiscord | <haxscramper> Likely I missed something |
14:56:09 | FromDiscord | <mratsim> Also it makes more sense to write graph tests in a graph library rather than requiring nimble create fake packages. |
14:56:52 | FromDiscord | <dom96> Agreed |
14:57:15 | FromDiscord | <mratsim> you can put nimble logic as a "graph library" core that you test first |
14:57:55 | FromDiscord | <mratsim> Also I don't think this is exponential, I'm pretty sure the problem is in similar class to nqueens which is O(n^n) |
14:58:17 | FromDiscord | <mratsim> and with backtracking O(n!) |
14:58:28 | * | krux02 quit (Remote host closed the connection) |
14:59:10 | * | krux02 joined #nim |
15:04:05 | FromDiscord | <dom96> From what I was told the infamous lock files PR has fixes to dependency resolution issues |
15:05:06 | FromDiscord | <dom96> in the long run I believe we will need to centralise the storage of packages, even if to just gain a cache of dependencies |
15:05:39 | FromDiscord | <dom96> What's more pressing though is fixing SSL problems, anyone willing to help out? https://github.com/nim-lang/nimble/pull/893 |
15:11:54 | * | xet7 quit (Remote host closed the connection) |
15:12:04 | federico3 | @dom96 can you provide steps to reproduce the issue? |
15:12:46 | FromDiscord | <dom96> `nimble build && ./nimble refresh` reproduces it on Ubuntu (WSL) for me. |
15:13:09 | federico3 | not here |
15:16:13 | federico3 | what failure are you seeing exactly? |
15:17:14 | FromDiscord | <dom96> You can see the failures in CI here https://github.com/nim-lang/nimble/runs/1842564468 |
15:17:36 | FromDiscord | <dom96> and actually it appears they do not happen on Nim 1.4 in the CI |
15:20:02 | FromDiscord | <dom96> hm, yeah, just checked again locally and it works with 1.4.2 |
15:21:48 | FromDiscord | <dom96> I guess we have some SSL changes that need to be backported to Nim 1.0.x |
15:22:30 | federico3 | but... is Nimble going to be shipped again with the 1.0 train? |
15:23:03 | FromDiscord | <dom96> yeah, we should make sure that it does get shipped with the latest Nimble |
15:24:21 | federico3 | instead of backporting the fix to the version of Nimble that was shipped with the last 1.0.x release? |
15:25:28 | FromDiscord | <dom96> I don't think we do this. But I don't do the backports so not sure |
15:26:36 | federico3 | so...? |
15:30:10 | FromDiscord | <dom96> I created https://github.com/nim-lang/security/issues/2 |
15:30:44 | FromDiscord | <dom96> Feel free to make suggestions there |
15:32:57 | * | fredrikhr quit (Ping timeout: 264 seconds) |
15:34:22 | * | xet7 joined #nim |
15:37:45 | * | xet7 quit (Remote host closed the connection) |
15:44:59 | * | irchaxwell_ joined #nim |
15:47:28 | Oddmonger | for creating a ref, new is not mandatory ? |
15:47:58 | Oddmonger | type Foo = ref object โฆ var f:Foo = Foo() # is ok, but not var f:Foo = new Foo() |
15:48:24 | * | irchaxwell quit (Ping timeout: 240 seconds) |
15:49:37 | Oddmonger | think i'm confusing with C++ |
15:50:23 | Oddmonger | when you compile without GC , what happens to ref objects ? |
15:50:58 | FromDiscord | <dom96> Gotta love CI failing because of warnings |
15:51:43 | FromDiscord | <lqdev> Oddmonger: they will never get deallocated |
15:51:56 | Oddmonger | for example, with this , i get leaks ? https://play.nim-lang.org/#ix=2Owm |
15:51:58 | FromDiscord | <lqdev> if you use --gc:none, you need to use raw allocations |
15:52:13 | FromDiscord | <lqdev> yeah, this leaks with --gc:none |
15:52:36 | Oddmonger | so i cannot use ref , with no gc ? |
15:52:45 | Oddmonger | or can i free ref ? |
15:53:25 | krux02 | Oddmonger, no gc really means don't use ref string seq |
15:53:36 | krux02 | not the most useful language |
15:53:46 | krux02 | use orc or arc |
15:54:13 | krux02 | no personal experience with it, but it is what you probably expect fron no gc |
15:54:53 | Oddmonger | thanks for your anwers. So , there is no ยซmanualยป way to free a ref |
15:57:27 | FromDiscord | <lqdev> no. |
15:58:43 | Oddmonger | ok , at least no magic |
15:59:02 | * | PMunch quit (Quit: leaving) |
16:00:01 | * | matthias[m] quit (Quit: Idle for 30+ days) |
16:02:19 | * | waleee-cl joined #nim |
16:04:49 | ForumUpdaterBot | New thread by Mantielero: Exportc - , see https://forum.nim-lang.org/t/7481 |
16:06:29 | saem | Morning |
16:08:02 | leorize | o/ |
16:12:40 | * | abm quit (Quit: Leaving) |
16:17:28 | * | Vladar joined #nim |
16:38:54 | FromDiscord | <zetashift> Hola |
16:40:39 | saem | Hiya, folks |
16:43:51 | saem | I'm psyching myself up to write some tests or futz with symbols or whatever this bug needs. |
16:44:01 | FromDiscord | <trickster0> Hello i am fetching a couple of column results from database and then try to render it but i am getting an error that it returned None as result or there was not return . Anyone knows why? i can share the code block |
16:47:37 | * | irchaxwell_ quit (Quit: Leaving) |
16:48:46 | saem | Those kind of things are more about debugging an operational chain. |
16:49:32 | saem | Can you echo the query before execution? |
16:49:47 | saem | Then try it by hand to see if it gets results? |
16:50:49 | FromDiscord | <trickster0> it does get printed |
16:50:52 | FromDiscord | <trickster0> sent a code paste, see https://play.nim-lang.org/#ix=2OwJ |
16:51:37 | FromDiscord | <trickster0> if i print data it gets printed like this ({'uid': 'DESKTOP-UK0BA80'}, {'uid': 'DESKTOP-UK0BA81'}) |
16:51:50 | FromDiscord | <trickster0> they are random value so dont worry about it ๐ |
16:52:36 | FromDiscord | <trickster0> sent a code paste, see https://play.nim-lang.org/#ix=2OwN |
16:53:35 | saem | Need more snippet. |
16:54:27 | saem | Oh so the result does echo, but it's not going into the template? |
16:54:41 | FromDiscord | <trickster0> no |
16:55:11 | FromDiscord | <trickster0> i get โตTypeError: The view function did not return a valid response. The function either returned None or ended without a return statement. |
16:57:08 | saem | It's too hard to advise without a more complete example. |
16:57:30 | FromDiscord | <trickster0> this is the whole thing, there is really nothing more than it |
17:00:15 | saem | It's not, because there is a view function or something and your snippet doesn't show that. I don't know what libraries you're using, etc... |
17:01:39 | FromDiscord | <trickster0> sent a code paste, see https://play.nim-lang.org/#ix=2OwV |
17:03:13 | saem | Perhaps someone with more experience with these libraries and such can help. |
17:05:51 | FromDiscord | <Solitude> how is this nim related? |
17:06:42 | saem | Oh wait, that's Python flask? |
17:06:55 | saem | I thought maybe a Nim port |
17:07:13 | FromDiscord | <trickster0> omg sorry i confused the discord channels lol |
17:07:18 | FromDiscord | <Rika> nim doesnt have "TypeError" i believe |
17:09:21 | FromDiscord | <lqdev> don't delete your messages, it's futile because https://irclogs.nim-lang.org/ exists |
17:12:10 | FromDiscord | <Recruit_main707> Oddmonger: there is a way to free refs |
17:12:11 | FromDiscord | <trickster0> it is not about logs |
17:12:18 | FromDiscord | <trickster0> it is about this place being a Nim place |
17:12:30 | FromDiscord | <trickster0> if it were Nim i would have left it |
17:13:28 | FromDiscord | <Recruit_main707> with gc:regions you manage use manual memory management the same way as you would with gc:none + you can use memory regions to allocate and deallocate refs and strings or any ref object |
17:13:49 | FromDiscord | <Recruit_main707> crappy writting right there |
17:14:31 | leorize | gc:regions can probably use a reimplementation on top of gc:destructors |
17:14:59 | leorize | but I don't think Araq is gonna stablize and document gc:destructors hooks anytime soon |
17:17:18 | * | liblq-dev joined #nim |
17:17:46 | FromDiscord | <Recruit_main707> leorize: yeah i thought about something like that, but regions wont be developed by the nim team any further, but if its there for me and anyone else to use it (and commit) i have more than enough |
17:17:49 | ForumUpdaterBot | New post on r/nim by Rc202402: How can i create a function to return random string?, see https://www.reddit.com/r/nim/comments/le1ye9/how_can_i_create_a_function_to_return_random/ |
17:21:01 | * | vycb[m] joined #nim |
17:34:19 | * | vicfred joined #nim |
17:35:00 | * | a_chou joined #nim |
17:37:22 | i_use_arch_btw[m | Anyone knows how to generate a random string from given charset and length? |
17:38:09 | i_use_arch_btw[m | I tried sample(seq) from random module. It's not that random ๐
|
17:38:30 | leorize | have you called `randomize()` to initialize the generator? |
17:38:42 | leorize | ofc it also depends on how random do you want things to be |
17:38:52 | * | wowi42 quit (Quit: Kowa Bunga!!!) |
17:39:34 | FromDiscord | <dom96> Anyone wanna give me an approval? https://github.com/nim-lang/nimble/pull/894. Just want to make sure I didn't miss something. |
17:40:19 | FromDiscord | <lqdev> this feels like a band-aid solution tbh |
17:40:44 | leorize | looks fine but shouldn't you replace doCmdEx with something taking a `varargs[string]`? |
17:40:49 | FromDiscord | <lqdev> the better solution would be to just omit the shell entirely |
17:40:52 | FromDiscord | <lqdev> yeah |
17:41:29 | FromDiscord | <lqdev> https://nim-lang.org/docs/osproc.html#execProcess%2Cstring%2Cstring%2CopenArray%5Bstring%5D%2CStringTableRef%2Cset%5BProcessOption%5D |
17:41:35 | FromDiscord | <lqdev> just remember to pass options explicitly. |
17:41:58 | i_use_arch_btw[m | <leorize "have you called `randomize()` to"> Yes |
17:42:12 | FromDiscord | <dom96> It fixes the problem though. That sounds like a wider refactor. |
17:42:19 | leorize | i_use_arch_btw[m: what kind of randomness do you want? |
17:42:39 | leorize | dom96: preventative measure is better imo |
17:42:55 | FromDiscord | <lqdev> yes dom, "if it works, don't touch it". right? |
17:42:57 | i_use_arch_btw[m | <leorize "i_use_arch_btw: what kind of ran"> It's like a client identifier auto generated for each client when connecting to an api. |
17:43:29 | FromDiscord | <dom96> @lqdev yes, I've already spent a large portion of my Friday fixing the CI and the other problems. |
17:43:29 | leorize | i_use_arch_btw[m: the sysrand package would work better then |
17:43:34 | FromDiscord | <lqdev> the thing is that a bigger refactor may reveal more potential bugs |
17:43:46 | FromDiscord | <lqdev> with doCmdEx usage |
17:43:58 | i_use_arch_btw[m | <leorize "i_use_arch_btw: the sysrand pack"> Ok. I'll check the docs and be back |
17:44:43 | leorize | dom96: that PR is fine for a quick fix but please open a bug for a refactoring |
17:45:29 | FromDiscord | <dom96> leorize: can you please open it? I'm actually about to head out ๐ |
17:47:34 | FromDiscord | <dom96> tbh maybe to be safe we should do this refactoring |
17:47:42 | FromDiscord | <dom96> But I will leave that to Araq |
17:48:21 | leorize | you're handing nimble to Araq? |
17:48:41 | i_use_arch_btw[m | Wow didn't knew cheatfate open sourced sysrand. Nice module. |
17:49:50 | FromDiscord | <lqdev> i believe araq has other important stuff on his head right now. namely getting IC to a usable state |
17:49:52 | i_use_arch_btw[m | Uh. Wait. Is sysrand linux only ? |
17:50:06 | FromDiscord | <lqdev> c'mon, a little refactoring never killed anyone. |
17:52:19 | FromDiscord | <mratsim> @i_use_arch_btw, no it uses the OS RNG but it works with Linux, Windows, BSD, Macs .... |
17:54:06 | leorize | @dom96: opened #895 if you want to give it a priority tag |
17:54:17 | i_use_arch_btw[m | Yeah. I Just checked the [sources](https://github.com/cheatfate/nimcrypto/blob/a065c1741836462762d18d2fced1fedd46095b02/nimcrypto/sysrand.nim#L154) |
18:06:12 | * | Productive2 joined #nim |
18:07:40 | i_use_arch_btw[m | hi. I'm kinda new to nim so excuse me |
18:07:54 | i_use_arch_btw[m | What's the difference between seq and openarray? |
18:09:20 | FromDiscord | <lqdev> a seq is an actual container that you can modify, while openArray is more like a Go/Rust slice - basically a bounded, low-overhead pointer to some array in memory |
18:10:00 | Clonkk[m] | https://nim-lang.org/docs/manual.html#types-open-arrays |
18:17:36 | * | a_chou quit (Remote host closed the connection) |
18:27:26 | i_use_arch_btw[m | So, sequences are like dynamic arrays that can be modified, and updates its parameters during runtime. Like python3 arrays / [ ]. |
18:27:26 | i_use_arch_btw[m | open arrays are just like sequences but usable only as paramters. |
18:27:26 | i_use_arch_btw[m | That's all right? did i miss something? |
18:30:24 | FromDiscord | <lqdev> open arrays cannot be resized |
18:30:32 | FromDiscord | <lqdev> so you can't add/remove elements from it |
18:30:37 | FromDiscord | <lqdev> you can change the elements, though |
18:30:52 | FromDiscord | <lqdev> if it's a `var openArray[T]`, though |
18:31:03 | FromDiscord | <lqdev> though though though though. |
18:31:50 | FromDiscord | <haxscramper> For the most part you can think of `openarray` as a convenience type when dealing with procs that need to accept `seq or array` |
18:32:26 | i_use_arch_btw[m | Yeah. |
18:35:44 | i_use_arch_btw[m | I guess I'll not need it until I need a staic iterable array as a parameter. |
18:36:05 | i_use_arch_btw[m | Also thanks though ๐ |
18:40:27 | * | xet7 joined #nim |
18:57:02 | * | xet7 quit (Remote host closed the connection) |
19:19:21 | * | a_chou joined #nim |
19:28:46 | leorize | !eval var x = -1; echo uint(x) |
19:28:48 | NimBot | 18446744073709551615 |
19:39:19 | FromDiscord | <Ardek> !eval echo uint(0x2be or not 0x2be) |
19:39:21 | NimBot | Compile failed: /usercode/in.nim(1, 10) Error: -1 can't be converted to uint |
19:39:33 | FromDiscord | <Ardek> welp |
19:39:45 | * | a_chou quit (Remote host closed the connection) |
19:40:32 | FromDiscord | <haxscramper> now for some reason two more CI tasks fail due to dependency resolution |
19:41:14 | FromDiscord | <haxscramper> While some ones work perfectly fine |
19:42:27 | saem | hax nkError related stuff? |
19:43:06 | FromDiscord | <haxscramper> no, just nimble can't resolve dependency |
19:43:13 | saem | ah |
19:44:14 | FromDiscord | <haxscramper> I plan to start workin on `nkError` maybe next month, not earlier because I have hands full with C++/haxdoc |
19:44:29 | FromDiscord | <haxscramper> @lqdev https://github.com/bulletphysics/bullet3 - this is a physics engine you wanted to wrapp for C++? |
19:44:34 | FromDiscord | <lqdev> yes |
19:46:50 | saem | Is there a way to run compiler tests for the language features and not so much the stdlib? |
19:49:10 | * | Kaivo quit (Quit: WeeChat 3.0) |
19:50:37 | FromDiscord | <haxscramper> I believe testament supports test categories |
19:50:50 | FromDiscord | <haxscramper> So maybe there are parts dedicated to compiler-only testing |
19:51:47 | saem | I'm looking at categories.nim and am running a few but nothing seems to fit the bill. Koch has test, but that seems to just run everything. |
20:05:16 | * | superbia quit (Quit: WeeChat 3.0) |
20:08:31 | saem | @timotheecour if you're about and have time do you think I could rubberduck/bounce some thoughts off your about 16922? |
20:10:55 | leorize[m] | saem: depends on what language features you wanna run tests for |
20:13:22 | saem | leorize[m]: most of them, it's a bit fuzzy I admit, but I'm mostly trying to avoid IO and slower bits of the tests. I want to get fast feedback because I'm changing things that will impact procs, templates, macros, methods, ... |
20:13:48 | leorize[m] | tests can import compiler modules if you want that |
20:15:12 | saem | A crappy first definition would be stuff in the manual and experimental. |
20:18:44 | ForumUpdaterBot | New post on r/nim by sigzero: Nim and MacPorts, see https://www.reddit.com/r/nim/comments/le5uci/nim_and_macports/ |
20:18:56 | FromGitter | <timotheecour> > *<saem>* Is there a way to run compiler tests for the language features and not so much the stdlib? โ โ that would be feasible via https://github.com/timotheecour/Nim/issues/445 |
20:19:10 | FromGitter | <timotheecour> *<saem>* @timotheecour if you're about and have time do you think I could rubberduck/bounce some thoughts off your about 16922? โ โ whaddup |
20:22:40 | saem | @timotheecour yeah categories like that would be handy or if the language feature bits were just a test suite onto themselves in a hierarchy. |
20:23:07 | saem | For 16922 I'm not sure, I was hoping to describe a few things on a chat and then see what comes of it. |
20:23:33 | FromGitter | <timotheecour> categories suck, thatโs why i suggest tags instead in that RFC :) |
20:24:46 | saem | @timotheecour: https://meet.jit.si/16922justthinking <-- that work for you? |
20:26:26 | FromGitter | <timotheecour> for 16922, either araq intends to continue on his branch after merging yours against his, in which case itโs fine to do a PR against his, or he doesnโt, in which case you should rebase against devel so it can be in a mergeable state; if done properly, when PR is squashed and merged, both him and you will be attributed if thatโs what youโre worried about |
20:26:59 | FromGitter | <timotheecour> what about just PM on gitter? |
20:27:33 | saem | I'm not worried about the rebase and all that. It's about what the fix should actually be. |
20:30:14 | * | def- quit (Quit: -) |
20:31:38 | FromGitter | <timotheecour> > It's t11166.nim that's demonstrates the issue โ โ how is tests/js/t11166.nim related? |
20:31:39 | * | def- joined #nim |
20:32:26 | saem | That's the test that fails. It fails because it was relying on the vm global fail counter/short circuit behaviour. |
20:32:49 | saem | Which itself shouldn't be there and once removed it re-exposed the unresolved bug |
20:33:43 | FromGitter | <timotheecour> `nim r -b:js tests/js/t11166.nim` works on devel |
20:34:07 | saem | Because devel is broken and papering over the bug? |
20:34:09 | FromGitter | <timotheecour> o i c, u mean it fails in your PR |
20:34:13 | saem | yes |
20:34:33 | saem | basically that compiles causes us to go into the dot operator code in jsffi |
20:34:57 | saem | in there you'll see the template with the return type of Obj.V, line 308 or so |
20:35:14 | * | Tanger quit (Remote host closed the connection) |
20:35:28 | saem | That return type is where things go awry in sem. |
20:35:37 | * | Tanger joined #nim |
20:36:27 | saem | Once we're there the sem pass is doing the following: semtypes.semtypenode nkdotexpr branch calls out to semexpr. |
20:38:01 | saem | semexpr goes into the nkdotexpr branch, semfieldaccess does its thing and it comes back as a nkdotcall with nfdotflag, which then goes into that if call and back into semexpr, this time the nkCall ... branch. |
20:39:56 | saem | The problem is that it keeps doing this because in `compiles(c.props)`, `c` is of type tyProxy, because it doesn't exist. Nothing in the call/field access/lookup code ever considers this and it keeps retrying over and over. |
20:40:17 | saem | until you hit the recursion limit (2k) and it errors out. |
20:41:50 | saem | My hacky fix catches that occurrence and bails. I doubt it breaks anything, but it seems all wrong to arbitrary check that there. There is a deeper set of issues here and I'm struggling to sort out what the approach should be. |
20:42:23 | saem | Bits of this have to do with sym lookup being conflated with sem pass bits -- pointed out by Araq elsewhere as a general statement. |
20:43:24 | saem | Part of it seems to be the way overload resolution not taking into account the "receiver" -- first parameter. |
20:43:47 | FromGitter | <timotheecour> a few things: โ โ 1) it would help if you rebased against devel โ 2) if you added `fix https://github.com/nim-lang/Nim/issues/11166 properly` in your PR top msg โ Also, `nim r -b:js tests/js/t11166.nim` does work both in devel and your PR, but is the problem that the `#if g.config.errorCounter > 0: return errorNode(idgen, module, n)` commenting is what you call peppering out? thatโs not clear |
20:43:47 | FromGitter | ... [https://gitter.im/nim-lang/Nim?at=601eff83428d9727dd5d6918] |
20:44:19 | saem | Part of it seems to be not passing quite the right information along to trigger the exit of the recursive loop. |
20:45:56 | saem | Commenting that out is the right thing -- that code should go. Instead bugs causing those errors should be fixed. |
20:46:04 | FromGitter | <timotheecour> also, IIUC this has nothing to do with `js`, can you add a repro bug that also affects regular backend (via some code that has a dot operator) |
20:47:59 | saem | That's a language spec as a set of tests IMO. |
20:48:44 | saem | which is what I'd like to run first and foremost and then add to based on the gaps. |
20:49:41 | saem | Nailing down the behaviour definition is part of it, like what should these things even mean. |
21:16:06 | * | haxscramper quit (Remote host closed the connection) |
21:16:30 | * | haxscramper joined #nim |
21:16:30 | * | haxscramper quit (Remote host closed the connection) |
21:35:27 | * | vicfred quit (Quit: Leaving) |
21:37:14 | * | vicfred joined #nim |
21:49:34 | saem | I wonder if reworking sem*.nim files so includes are no longer used but instead a set of recursive import/exports would be accepted? It'd open up nimsuggest working on sem sooner and the restructuring might have knock on benefits as the dependencies are clearer. |
21:51:39 | leorize | this is the kind of stuff that you would have to ping @Araq |
21:52:25 | * | audiophile joined #nim |
21:52:39 | audiophile | anyone know how i can intercept clipboard on windows using nim? |
21:56:19 | FromGitter | <timotheecour> @audiophile please make a PR + RFC, itโs generally useful and exists in most OS so we should offer a os-independant API that wraps around each OSโs way to do this (osx, linux, windows) |
21:56:58 | audiophile | I wish I were competent enough to do that :/ |
21:57:09 | leorize | this is not something to be in the stdlib tbh |
21:57:09 | FromGitter | <timotheecour> just try :) |
21:57:21 | leorize | stdlib is not a kitchen sink anymore |
21:57:21 | audiophile | I guess maybe take inspiration from autohotkey? |
21:57:32 | FromGitter | <timotheecour> at very least fusion. itโs important enough |
21:57:41 | leorize | needed-libraries is a good place to put a request |
21:58:07 | leorize | the way things like clipboard function is very volatile between OS |
21:58:24 | FromGitter | <timotheecour> thatโs the whole point, you wrap it into a OS-independant API |
21:58:28 | leorize | I think this is too complex for something in the stdlib |
21:58:53 | leorize | no, I mean that each OS has a different semantic in how this work |
21:59:04 | leorize | the idea of clipboard is not synchronized |
21:59:17 | FromGitter | <timotheecour> for the 90% use case itโs good enough |
21:59:22 | leorize | and it would require external deps, meaning that it's not suitable for fusion |
21:59:47 | FromGitter | <timotheecour> individual modules can require optional deps |
22:00:09 | leorize | we do have a library ecosystem... we should try to grow it instead of shoving things into fusion/stdlib |
22:01:30 | leorize | fusion works for things we want to standardize, basically stdlib candidates |
22:01:38 | FromGitter | <timotheecour> it can be a nimble package too; but itโs not something that can grow indefinitely with lots of features, itโs a well scoped, solvable problem that is useful enough |
22:02:13 | FromGitter | <timotheecour> unlike a gui library which can keep growing over time |
22:02:50 | leorize | I would say this is pretty much in the gui automation library bucket |
22:03:31 | * | actuallybatman quit (Quit: leaving) |
22:06:52 | FromGitter | <timotheecour> > I wonder if reworking sem*.nim files so includes are no longer used but instead a set of recursive import/exports would be accepted? It'd open up nimsuggest working on sem sooner and the restructuring might have knock on benefits as the dependencies are clearer. โ โ @saem Iโd be strongly in favor of that, almost all includes should be turned ino imports , at very least for compiler code |
22:07:38 | leorize | note that Araq plans to have IC implemented as backing for recursive imports |
22:09:31 | leorize | audiophile: for your case I suppose you should look for how it is done in Windows C++ then go from there |
22:09:56 | leorize | you can request for an automation library like autohotkey in nim-lang/needed-libraries :P |
22:10:39 | FromGitter | <akavel> Hi! Noob question: having a ref to a "base" type, (how) can I print the name of the "runtime" type it points to? |
22:11:05 | leorize | I don't think you can without hacks |
22:12:11 | FromDiscord | <zidsal> just checking according to stackoverflow nim used to have a list comprehension macro in sgar. Am I right in thinking this was replaced by `collect` ? |
22:12:36 | FromDiscord | <InventorMatt> yes, collect is the list comprehension equivalent |
22:12:36 | FromDiscord | <zidsal> (edit) "sgar." => "sugar." |
22:12:43 | FromGitter | <akavel> uh :/ |
22:13:30 | leorize | akavel: I suppose you're doing this as a debugging thing? |
22:14:00 | FromGitter | <akavel> @leorize yep, I try to use some library that uses refs hierarchies extensively and I'm trying to understand what's the structure it builds |
22:14:18 | FromGitter | <akavel> (namely, nim-markdown) |
22:15:00 | leorize | maybe repr can print it, but then it would print a bit too much |
22:16:01 | FromGitter | <akavel> @leorize: yeahhhh, tried repr first thing, *much* too much ๐
unfortunately |
22:16:55 | leorize | looks like not even the typeinfo module has it |
22:17:07 | leorize | yea, I suppose that you can't do it without hacks |
22:17:29 | leorize | you can try to copy whatever repr do |
22:17:34 | leorize | repr should be written in Nim |
22:18:20 | leorize | in the future ARC/ORC will get rid of most RTTI so it will be even worse |
22:18:59 | FromGitter | <akavel> @leorize: actually, from what I see, repr seems to print much too much, while still not printing names of the types actually....... |
22:19:21 | leorize | ... |
22:19:29 | leorize | there is this very ugly hack you can try |
22:19:49 | leorize | grep the codebase for everything inheriting the type you're inspecting |
22:20:07 | leorize | then make a bunch of `if x of T` :P |
22:20:43 | FromGitter | <akavel> hmmmmm that is *some* way out indeed..... |
22:21:40 | FromGitter | <akavel> seems like this could work; thanks!!! <3 |
22:22:41 | FromGitter | <akavel> uhh, tho it |
22:22:44 | FromGitter | <akavel> 's tricky |
22:23:19 | FromGitter | <akavel> as that's a *hierarchy*, so there's further inheriting from inheritants.... |
22:23:44 | leorize | this is one of those time that you would wish nimsuggest worked |
22:24:05 | FromGitter | <akavel> hm, I think I can grep all 'of' words |
22:24:09 | * | opal quit (Quit: i'm never coming back) |
22:24:10 | FromGitter | <timotheecour> IMO what we need is `parentClass` |
22:24:23 | FromGitter | <akavel> and then compiler will shout at me for the ones that can't fit in the hierarchy |
22:24:34 | leorize | sounds like a plan |
22:24:44 | leorize | timotheecour: what's that? |
22:24:48 | FromGitter | <akavel> hmh, but then killing them one by one will be painful :/ |
22:25:18 | leorize | `nim c --maxErrors:999` :) |
22:25:49 | FromGitter | <akavel> ohhhhhhhhhhhh that's a nice one, thanks again! |
22:26:11 | FromGitter | <akavel> Nim's options are a whole separate universe..... |
22:26:42 | leorize | you can thank @timotheecour for those flags :P |
22:27:13 | FromGitter | <akavel> ok, thank you @timotheecour then! |
22:35:57 | * | liblq-dev quit (Ping timeout: 272 seconds) |
22:38:19 | * | liblq-dev joined #nim |
22:39:33 | * | Adeon is now known as ajkshdksajhd |
22:39:46 | * | ajkshdksajhd is now known as Adeon |
22:53:10 | FromGitter | <timotheecour> sure :) โ โ > IMO what we need is `parentClass` โ > *<leorize>* @timotheecour: what's that? โ ... [https://gitter.im/nim-lang/Nim?at=601f1dd6428d9727dd5db47d] |
22:54:32 | FromDiscord | <Ricky Spanish> Is there some kind of frameworks available for laying out a vm? I'm looking for a way to create a dynamic c analysis tool by loading in a parse tree and then executing it but I'm not sure if a vm is the approach I should take for this problem? |
23:03:16 | * | vicfred quit (Quit: Leaving) |
23:05:47 | * | tane quit (Quit: Leaving) |
23:15:28 | * | vicfred joined #nim |
23:33:13 | krux02 | what kind of C analysis tool are you thinking about? |
23:37:41 | * | liblq-dev quit (Quit: WeeChat 3.0) |
23:46:35 | * | Vladar quit (Quit: Leaving) |