<< 30-01-2024 >>

01:08:43FromDiscord<jaar23> In reply to @norax.2 "okay i might not": Nah, I'm not a pro either. Your code will work and shorten it as well. Its because the lib still in heavy development stage, I'm trying to be explicit on every action before I move on further. Thanks for pointing out
01:19:33*xet7 quit (Ping timeout: 260 seconds)
01:23:14*derpydoo quit (Ping timeout: 260 seconds)
01:51:46FromDiscord<user2m> sorry if this sounds silly, but could someone explain pragmas to me simply? I use them all the time, and have read the docs but I'm still confused. are they like functions that talk directly to the compiler?
01:54:23FromDiscord<Elegantbeef> There are multiple types of pragmas
01:54:31FromDiscord<Elegantbeef> Some just tell the compiler to do things, others call macros or templates
01:58:15FromDiscord<user2m> In reply to @Elegantbeef "Some just tell the": hmm ok I'm just trying to get a mental model of them - are they more akin to procs or passing in compiler options?
01:58:58FromDiscord<Elegantbeef> The compiler builtin ones are compiler options
01:59:07FromDiscord<Elegantbeef> The user defined ones are macro/template invocations
03:01:11NimEventerNew thread by 4n0n4me: HTTP/2 Support?, see https://forum.nim-lang.org/t/10928
03:44:17FromDiscord<user2m> In reply to @Elegantbeef "The compiler builtin ones": ok I think I understand a bit more
03:50:59FromDiscord<pierce.jason> In reply to @graveflo "I think the docs": "that uses it", like reverse-dep?
03:52:10FromDiscord<graveflo> any time that type is a parameter or return type in a signature it should register. It would just be a simple way of knowing what work has already been done and maybe some part of intent of use
03:54:00FromDiscord<graveflo> like if there was a type `A` maybe you don't know exactly what it is supposed to be used for just from the description and the fields, but if you could easily see a filtered list of all things that interact with it you would know pretty much instantly. Also if you are using that type for something and you figure "I want to do X with this" you would quickly know if that is already supported somewhere else in the standard library
03:54:41FromDiscord<graveflo> plus having everything in one massive list is just a stupid way to organize information
03:54:46FromDiscord<pierce.jason> can you give me an example doc URL for a type, with a couple reverse-dep doc pages it should link to that use the type?
03:55:50FromDiscord<graveflo> most of them in the system module: https://nim-lang.org/docs/system.html
03:56:06FromDiscord<graveflo> streams, io too
03:58:07FromDiscord<graveflo> even the `procs` and such that are on the same page as the type def are annoying to find. You're just ctrl+f and have to remember all the ones you passed while scanning through. It's just way more work then it needs to be
03:59:59FromDiscord<pierce.jason> would len() be the first on the system page that needs links? It links to str and int
04:00:35FromDiscord<graveflo> I would say that `string` needs it's own page and `len` would be on that page since it interacts with `string`
04:01:04*khazakar quit (Quit: Connection closed for inactivity)
04:01:34FromDiscord<graveflo> I'm saying it would be nice to isolate just 1 type and see everything that interacts with it. In sections would be nice too. like when the type is the first parameter, when its a parameter, when its a return type, when its generically compatible etc
04:02:11FromDiscord<graveflo> just like a "type use cases at a glance" directory type thingy
04:02:49FromDiscord<Elegantbeef> > generically compatible↵That one is a big noise generator
04:03:03FromDiscord<graveflo> yea thats why its at the end
04:03:44FromDiscord<pierce.jason> string has its own "section" that links from len(). You would like to see a list of links in the section for string that goes to len(), add(), etc?
04:04:05FromDiscord<Elegantbeef> Grave wants a page dedicated to string that lists all procedures that operate on string
04:04:42FromDiscord<graveflo> I wouldn't want this crowding the module page because it would make it insanely long. I want a page specifically for each type that directs you to all use cases of that type across the entire standard library
04:04:47FromDiscord<graveflo> like a directory page
04:05:32FromDiscord<pierce.jason> ah, might be a good parsing project for me. Do the docs have a comprehensive list of builtin types somewhere?
04:06:21FromDiscord<Elegantbeef> Not that good of a parsing project
04:06:22FromDiscord<Elegantbeef> More like a good hacking on the compiler project
04:07:24FromDiscord<pierce.jason> I was thinking paesing the online docs with string functions to create a reverse-dep style map?
04:07:37FromDiscord<graveflo> it would be a nice feature of the documentation generating tool. Idk if it does "batches" like it would need to now. I've never used nims docs generator.
04:08:56FromDiscord<Elegantbeef> Well generics and implicit conversions would not be feasible
04:09:11FromDiscord<graveflo> you mean for the aggregation?
04:09:57FromDiscord<Elegantbeef> Yes it'd require compiling all procedures that are generic to check for convertibillity for all types
04:09:59FromDiscord<graveflo> generics should be feasible I think
04:10:28FromDiscord<graveflo> idk if you have to compile them. You just have to sigmatch them
04:10:47FromDiscord<Elegantbeef> No you need to compile them to ensure they work
04:10:51FromDiscord<graveflo> typeRel should tell you if they are related
04:12:35FromDiscord<graveflo> oh right you mean the duck typing aspect of it
04:13:45FromDiscord<graveflo> eh maybe its a shitty idea for generic compat or maybe the list can be acceptably shitty in that section idk. A solution that is best is best ig. I just want utility
04:14:26FromDiscord<Elegantbeef> I mean you get plenty with just explicit usage
04:14:40FromDiscord<pierce.jason> Yall lost me at generics, aggregate, and conversions. If the web docs have a list of types, I can grep to procedures that have documentation of using said type to get a list of all procs that can utilize XYZ type
04:14:59FromDiscord<graveflo> In reply to @Elegantbeef "I mean you get": meaning? querying nimsuggest on the fly?
04:15:01FromDiscord<Elegantbeef> I mean you can do searching that way
04:15:11FromDiscord<Elegantbeef> But it's much better to use the compiler to generate docs
04:15:20FromDiscord<Elegantbeef> I mean listing any procedure that explicitly uses the type
04:15:32FromDiscord<graveflo> can you do that on the doc page?
04:15:35FromDiscord<Elegantbeef> string can be special cased for `openArray[char]` aswell
04:15:45FromDiscord<Elegantbeef> No I mean in your new docgen tool
04:15:50FromDiscord<graveflo> oh I see
04:17:22*SchweinDeBurg joined #nim
04:17:42FromDiscord<pierce.jason> In reply to @Elegantbeef "string can be special": is that indicated by T or .magic? "[T] {.magic: "OpenArray".}
04:18:09FromDiscord<Elegantbeef> The compiler implicitly converts `string` to `openArray[char]`
04:20:06FromDiscord<pierce.jason> do the docs indicate that at https://nim-lang.org/docs/system.html#openArray ? openArray[T] {.magic: "OpenArray".}
04:20:19FromDiscord<Elegantbeef> Nope
04:20:47FromDiscord<Elegantbeef> It's an internal behaviour
04:23:08FromDiscord<pierce.jason> darn. So how does one know about/findout about this feature?
04:23:25FromDiscord<Elegantbeef> manual and tutorials
04:27:05FromDiscord<graveflo> Well it seems like a tougher problem to solve then what I had initially thought but this is exactly the kind of thing I'm talking about. It would be really useful to get a run down of "stuff you can do with a string" on it's own page. You'd learn a lot really quick
04:27:44FromDiscord<graveflo> half the time I am forgetting stuff I already learned and then spending 10 min trying to find the page with the proc name I half remember
04:27:51FromDiscord<graveflo> but that is 50% a me problem at least
04:28:10FromDiscord<pierce.jason> @ElegantBeef im on the openArray docs page, is that not the manual you mean?
04:28:29FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#types-open-arrays
04:28:35FromDiscord<Elegantbeef> Nope those are the actual docs
04:28:59FromDiscord<Elegantbeef> https://nim-lang.org/docs/manual.html#types-string-type
04:29:21FromDiscord<Elegantbeef> Though now i realise it does not mention that in either
04:31:28FromDiscord<pierce.jason> oh, openarray is also a type! neat... where would i find a list of all types?
04:31:54FromDiscord<Elegantbeef> the system manual would list all types
04:31:58FromDiscord<Elegantbeef> built in types\
04:32:09FromDiscord<graveflo> theres a section per module
04:32:18FromDiscord<graveflo> on the left side bar
04:34:26FromDiscord<pierce.jason> @graveflo left side bar? Im seeing a pretty flat page at https://nim-lang.org/docs/system.html
04:36:08FromDiscord<graveflo> https://media.discordapp.net/attachments/371759389889003532/1201747652891381780/image.png?ex=65caf1b7&is=65b87cb7&hm=4ba11e844bb641c8d1da81d0ff56a012e6d13f810c25e9ba2e15f51dc3ec84dc&
04:38:32FromDiscord<pierce.jason> where are you seeing that? Url?
04:39:04FromDiscord<graveflo> its under this https://media.discordapp.net/attachments/371759389889003532/1201748388299677697/image.png?ex=65caf267&is=65b87d67&hm=705c900167e3a22cb9fc41de795b5857b50924976fd8a52b150c7bb3ac39c95d&
04:39:09FromDiscord<graveflo> on the left side bar for me
04:39:12FromDiscord<graveflo> same link you posted
04:40:09FromDiscord<pierce.jason> weird
04:40:15FromDiscord<graveflo> no see?
04:40:34FromDiscord<pierce.jason> nope
04:40:57FromDiscord<graveflo> k I'll post one more picture and then I'll consider it spam, just to be sure
04:41:05FromDiscord<pierce.jason> https://nim-lang.org/docs/system.html https://media.discordapp.net/attachments/371759389889003532/1201748894414012416/image.png?ex=65caf2df&is=65b87ddf&hm=d926e3dae90f26d82247997ee053727b2fc85f1337e7121d9cfff98949fb5564&
04:41:29FromDiscord<graveflo> do you have mobile mode on?
04:41:59FromDiscord<graveflo> were you the one who posted python code that was formated like your screen was 2" long?
04:42:40FromDiscord<pierce.jason> no and no. Vanilla chrome browser on win10
04:43:51FromDiscord<graveflo> yea your screen is not wide enough and there isn't an obvious way to get the side bar up in that view mode
04:44:13FromDiscord<graveflo> this scares and confuses the UX designer
04:44:19FromDiscord<graveflo> and the user
04:45:11FromDiscord<pierce.jason> 1024x768 is pretty normal still?
04:45:17FromDiscord<graveflo> not at all
04:45:29FromDiscord<pierce.jason> 😮
04:45:55FromDiscord<graveflo> but the site shouldnt do that. Thats not on you
04:46:49FromDiscord<pierce.jason> wow, fixed it... had windows scaling on to 125%, side bar showed up when turned off
04:47:07FromDiscord<pierce.jason> now im too blind to read haha
04:47:32FromDiscord<graveflo> are you on raspberry pi type of thing or something?
04:47:50FromDiscord<pierce.jason> cool, the manual is MUCH more usable too
04:48:44FromDiscord<pierce.jason> never noticed a website have problems on this res/scaling. been running this way for a couple years
04:49:32FromDiscord<pierce.jason> 23.8" AIO, touchscreen w/ a hand held keyboard...
04:49:43FromDiscord<graveflo> well half of websites barely function as it is, but that pane disappearing is a bug so I would like to say it should not be expected
04:50:24FromDiscord<graveflo> it should probably get hamburgered or something
04:50:44FromDiscord<graveflo> or shelved idk I'm not great with this stuff
04:51:07FromDiscord<pierce.jason> tacos, nim tacos
04:52:30FromDiscord<pierce.jason> 2 really annoying problems fixed in one afternoon noon for my Dev env! You guys rock
04:52:53FromDiscord<pierce.jason> I can work with that list
04:54:17FromDiscord<graveflo> glad to hear it
04:56:39FromDiscord<pierce.jason> want me to send you a dm to check it out when I have something put together?
04:59:07FromDiscord<graveflo> sure
05:07:54FromDiscord<pierce.jason> im out of here for the evening. Tall have a good'n and thanks again for the assistance
05:08:10FromDiscord<graveflo> gn
05:27:53*rockcavera quit (Remote host closed the connection)
06:40:33FromDiscord<Phil> In reply to @graveflo "well half of websites": To me that looks like a mobile optimization
06:40:53FromDiscord<Phil> Putting the breakpoint for mobile at less than 800px seems a bit rough though
06:41:46FromDiscord<Phil> (edit) "800px" => "1000px"
06:43:38FromDiscord<graveflo> Yea its an "adaptive" feature but ut doesnt have to eliminate the element. There are ways to make it work. Like the hamburger or a toggle shelf
06:43:51FromDiscord<Phil> This is the rule in question https://media.discordapp.net/attachments/371759389889003532/1201779793008537640/image.png?ex=65cb0fa6&is=65b89aa6&hm=a8d132473c04b6ee67408ce55238c053e5e974f849497bb82fa1d140fb2fa96f&
06:44:02FromDiscord<Phil> 860px width removes the sidebar, hmm
06:45:15FromDiscord<Phil> Or rather less than 860ox width removes it
06:56:17NimEventerNew Nimble package! nsdl2 - High level SDL 2.0 shared library wrapper, see https://github.com/amnr/nsdl2
07:01:18NimEventerNew Nimble package! nsdl1 - High level SDL 1.2 shared library wrapper, see https://github.com/amnr/nsdl1
07:06:18NimEventerNew Nimble package! nsdl3 - High level SDL 3.0 shared library wrapper, see https://github.com/amnr/nsdl3
07:06:50FromDiscord<nnsee> they just keep coming
07:08:27*PMunch joined #nim
07:22:59FromDiscord<odexine> wheres sdl4 :ArsGigaFace:
07:31:50Amun-Rannsee: these are mine… ;)
07:32:03Amun-Rapurely based on dlopen/dlsym
07:32:47Amun-Raso one could use all in single exe
07:37:46*advesperacit joined #nim
08:46:02PMunchHmm, I have some arrays of uint8's, is there a good `find` function for those?
08:46:46PMunchThere is `find` in system, but it doesn't have a start index, and can only search for a single item
08:47:12PMunchThe arrays are buffers I read data into and I need to find a multi-byte sequence in them
09:04:16FromDiscord<Elegantbeef> This is where I insert gloat about "If only strutils used openarray[char]" 😄
09:04:29NimEventerNew thread by sls1005: Definition of name equivalence, see https://forum.nim-lang.org/t/10929
09:21:22anddamcan someone help me running this example with a current nim setup? https://github.com/ajusa/simple-chat
09:21:44anddamwith 2.0.2 I get a ```Error: 'matchMatcher (Async)' is not GC-safe as it accesses 'chatrooms' which is a global using GC'ed memory```
09:47:49NimEventerNew thread by enthus1ast: Make your (linux) software more secure with seccomp, see https://forum.nim-lang.org/t/10930
09:59:56FromDiscord<nnsee> In reply to @NimEventer "New thread by enthus1ast:": very nice, wasn't aware of this package
10:53:49PMunchElegantbeef, yeah that would be nice
12:06:53NimEventerNew Nimble package! vier - Vim-Inspired Editor of Rasters, see https://xigoi.srht.site/vier/
12:10:19FromDiscord<nnsee> In reply to @NimEventer "New Nimble package! vier": oh wow, this looks cool
12:39:30PMunchIndeed! That's very cool!
12:53:20*jmdaemon quit (Ping timeout: 256 seconds)
13:33:05PMunchWhen comparing one variable against multiple options I often do something like this: `if messageStart in [laraRxBuffer.high, -1]: return` nifty hack or code-smell?
13:38:21FromDiscord<nnsee> why in reverse?
13:38:25FromDiscord<nnsee> i do that, but not the reverse bit
13:38:59*mronetwo quit (Ping timeout: 268 seconds)
13:39:00FromDiscord<nnsee> or, wait, that's not reverse
13:39:02FromDiscord<nnsee> brainfart
13:39:36*noeontheend quit (Ping timeout: 268 seconds)
13:39:40PMunchReverse?
13:40:11FromDiscord<nnsee> don't mind me
13:40:50*casaca quit (Ping timeout: 268 seconds)
13:40:51Amun-RaI wonder how the resulting code look like in comparison to case/"normal" if
13:41:10*greaser|q joined #nim
13:41:13PMunchHmm, yeah I guess it might copy those values into an array or something silly
13:41:27*deadmarshal_ quit (Ping timeout: 268 seconds)
13:41:27*GreaseMonkey quit (Ping timeout: 268 seconds)
13:41:42*noeontheend joined #nim
13:49:50FromDiscord<saint.___.> In reply to @nnsee "oh wow, this looks": Yeah! I'm gonna try this
13:50:37PMunchA bit weird that they say you need the Nim toolchain since it's written in Nim
13:50:47PMunchIf they had just pre-built binaries that wouldn't be necessary
13:50:58PMunch@xigoi ^
13:53:31*mronetwo joined #nim
13:54:04*deadmarshal_ joined #nim
14:06:58*redj joined #nim
14:45:41*derpydoo joined #nim
15:19:06*PMunch quit (Quit: Leaving)
15:19:25anddamPMunch: that `if messageStart in [laraRxBuffer.high, -1]:' is just checking for the value of messageStart in a sequence, right?
15:21:24Amun-Rayes
15:34:56Amun-RaI did some tests: https://play.nim-lang.org/#pasty=CgpgKsLUtjyR
16:34:31*rockcavera joined #nim
16:53:36*SchweinDeBurg quit (Quit: WeeChat 4.3.0-dev)
17:26:20*krux02 joined #nim
17:55:34FromDiscord<Robyn [She/Her]> I wonder if the Nim compiler gets any significant speed boosts from compiling with `-march-native`
18:26:52*jmdaemon joined #nim
18:41:11*khazakar joined #nim
18:48:54Amun-Rasometimes I wish nim would suggest the right enum order: https://play.nim-lang.org/#pasty=ehxNnImXESrH
19:09:40FromDiscord<mengu> probably this one has been asked a million times but excuse my being lazy, how solid is the nim cpp interop?
19:14:10Amun-Rasolid
19:16:10*fredrikhr joined #nim
19:17:20FromDiscord<leorize> not by much, the code mostly performs pointer chasing and can't be vectorized very well↵(@Robyn [She/Her])
19:35:25*jmdaemon quit (Ping timeout: 268 seconds)
19:37:31*greaser|q quit (Changing host)
19:37:31*greaser|q joined #nim
19:37:39*greaser|q is now known as GreaseMonkey
19:38:44*fredrikhr waves
19:39:00fredrikhrHi there, long time no see! :)
19:40:29fredrikhr(HexChat tells me it loaded the most recent log of me being logged on from May 18th 2023 :O
19:44:28FromDiscord<saint.___.> In reply to @fredrikhr "waves": Hiya!
19:52:42*jmdaemon joined #nim
20:04:54FromDiscord<nnsee> hello
20:27:45FromDiscord<Robyn [She/Her]> In reply to @leorize "not by much, the": Ah fair
20:31:09*derpydoo quit (Quit: derpydoo)
20:50:22*jmdaemon quit (Ping timeout: 260 seconds)
21:06:00*jmdaemon joined #nim
21:11:44FromDiscord<demotomohiro> In reply to @mengu "probably this one has": https://github.com/Clonkk/nim-cppstl
21:11:59FromDiscord<demotomohiro> You can use some C++ STL classes.
21:16:04Amun-RaI bridged Qt using std/dynlib and importcpp for my app, cpp interop just works :>
21:18:36FromDiscord<Robyn [She/Her]> In reply to @mengu "probably this one has": @jmgomez works on NimForUE so he probably has some insight :)
21:18:58Amun-Rawell, I cheated a little bit, all the UI is done using Qt's UI
21:38:19FromDiscord<whisperecean> I re-installed a package with nimble but now my project does not see this package 😮
21:44:10FromDiscord<Elegantbeef> Do you have a nimble file?
21:45:30FromDiscord<whisperecean> Nope
21:47:04FromDiscord<whisperecean> I added it
21:47:07FromDiscord<whisperecean> installed
21:47:13FromDiscord<whisperecean> but still my project does not see it...
21:47:32FromDiscord<Elegantbeef> `nimble build` or `nimble run`
21:52:42*fredrikhr quit (Quit: Disconnecting)
21:54:12FromDiscord<whisperecean> Works. Thanks
21:54:45FromDiscord<Elegantbeef> Now that is slower than `nim c` to actually do so this is where I mention atlas exists 😄
21:58:10Amun-RaI don't know what atlas is for to this day :>
21:58:55FromDiscord<Elegantbeef> It clones packages 😄
21:59:18Amun-Rahmm :>
21:59:28FromDiscord<Elegantbeef> Really it's as simple as making an environment per project(s) similar to Python's Venv
22:00:09Amun-Raoh
22:00:13FromDiscord<Elegantbeef> It allows for more deterministic builds and makes development a bit better cause you can just use `nim c` and it uses your local deps without having to go through Nimble's slow validation process
22:00:30FromDiscord<Elegantbeef> Though nimble also has local deps
22:00:45FromDiscord<Elegantbeef> No clue if it still has a slow startup time
22:01:05FromDiscord<Elegantbeef> I personally avoid `nimble bleh` for developing since it has such a slow startup time
22:01:43Amun-RaI use "nim c" in my Makefiles
22:02:25FromDiscord<Elegantbeef> That's not deterministic if you rely on nimble and do not pin to specific commits
22:02:37FromDiscord<Elegantbeef> `nim c` fetches the lowest version always iirc
22:03:51Amun-RaI use "nimble build" for initial setup (downloading deps, etc.); nim c for every day compiles
22:06:20FromDiscord<Elegantbeef> You can just do `nimble install -d` instead 😄
22:06:38FromDiscord<Elegantbeef> You should be concerned about developing with `nim c` though as it does not always match what nimble uses
22:07:06FromDiscord<user2m> is there a walkFilesRec iterator? https://nim-lang.org/docs/osdirs.html#walkFiles.i%2Cstring
22:07:39FromDiscord<Elegantbeef> `walkDirRec`
22:08:05Amun-Ra:)
22:09:28FromDiscord<user2m> In reply to @Elegantbeef "`walkDirRec`": but I don't seem to be able to filter with a pattern?
22:09:50FromDiscord<Elegantbeef> so then do `endsWith(".nim")`
22:10:08FromDiscord<Elegantbeef> It's not ideal of course
22:10:37FromDiscord<Elegantbeef> https://github.com/haltcase/glob might suite you
22:11:26FromDiscord<user2m> In reply to @Elegantbeef "so then do `endsWith(".nim")`": yeah tthat's what I'm currently doing - glob just might be what I need!
22:12:57FromDiscord<whisperecean> @Phil moigagoo added the schema for postgres. Yay!
22:13:09FromDiscord<Elegantbeef> I sorta just got reminded amun when do you make a proc that takes a static string and converts it into long and shot ops 😄
22:13:14FromDiscord<Elegantbeef> short\
22:13:19FromDiscord<whisperecean> And it works!
22:13:56FromDiscord<whisperecean> Now one problem remaining. How do I statically build libpq.dylib 😄
22:14:16FromDiscord<Elegantbeef> `optList"-c: -d --hmmm:= --huh="` much nicer!
22:14:26FromDiscord<Elegantbeef> You do not statically build libpq.dylib
22:14:36FromDiscord<whisperecean> Why not?!
22:14:41FromDiscord<Elegantbeef> You hope your package manager has a static library in the development files it likely ships
22:14:50FromDiscord<Elegantbeef> If not you build a static library of libpq
22:15:02FromDiscord<Elegantbeef> `dylib` is explicitly a dynamic library those are not the same as static libraries
22:15:44FromDiscord<whisperecean> ah yeah right
22:47:30*advesperacit quit ()
23:20:27*spacelucy joined #nim
23:48:32*jmdaemon quit (Ping timeout: 252 seconds)
23:56:14*khazakar quit (Quit: Connection closed for inactivity)