<< 08-09-2020 >>

00:05:12FromDiscord<19> type DWORD* = int32↵bitmapInfo.bmiHeader.biSize = sizeof(bitmapInfo.bmiHeader)↵ERROR: type mismatch: got <int> but expected 'DWORD = int32'
00:09:24*vicfred quit (Quit: Leaving)
00:13:55FromDiscord<tomck> Any useful libs for macros? as in, libs to help me implement complex macros in a 'nice' way, rather than imperatively going through the AST & transforming stuff myself?
00:16:51*abm quit (Read error: Connection reset by peer)
00:18:20FromDiscord<Rika> macroutils @tomck
00:25:25*konkrrrrrr is now known as kinkinkijkin
00:35:18*Tanger quit (Remote host closed the connection)
00:43:40FromDiscord<19> is it a good idea to take the C++ generated from nim and put it in visual studio to run through it? or is it way better to just use GDB in nim
00:43:45FromDiscord<tomck> Ty
00:44:10*kinkinkijkin quit (Read error: Connection reset by peer)
00:44:43*kinkinkijkin joined #nim
00:46:50*apahl quit (Ping timeout: 244 seconds)
00:47:49*apahl joined #nim
00:52:15disruptekuse gdb.
00:56:20FromDiscord<19> <disruptek> got it, thanks!
01:14:09*maier joined #nim
01:14:25*vicfred joined #nim
01:19:28*maier quit (Ping timeout: 260 seconds)
01:25:39*Tanger joined #nim
01:35:17*Zectbumo joined #nim
01:45:41disruptekYOU ARE WELCOME.
01:45:42*apahl quit (Ping timeout: 260 seconds)
01:46:14*apahl joined #nim
01:47:01*Zectbumo_ joined #nim
01:48:13*Zectbumo quit (Ping timeout: 264 seconds)
02:33:10*gmaggior quit (Ping timeout: 265 seconds)
02:38:17*audiofile quit (Ping timeout: 256 seconds)
02:45:14*gmaggior joined #nim
02:52:47*muffindrake quit (Ping timeout: 260 seconds)
02:52:49FromDiscord<iWonderAboutTuatara> @Rebel uses to be green
02:52:54FromDiscord<iWonderAboutTuatara> *used
02:54:36*muffindrake joined #nim
02:56:34FromDiscord<iWonderAboutTuatara> @Yardanico I think the issue here is that the color is very similar to js
03:13:50ldleworkehmry: so confusing. i can build two csfml files, one fails like before, one runs fine.
03:14:59*maier joined #nim
03:16:45ldleworkeh now it's not working at all
03:18:56ldleworkdarn i wish this would work
03:20:13*maier quit (Ping timeout: 260 seconds)
03:20:20ldleworkargh oh well, few more years :)
03:32:20*waleee-cl quit (Quit: Connection closed for inactivity)
04:06:01*supakeen quit (Quit: WeeChat 2.9)
04:06:44*supakeen joined #nim
04:31:19Tangerldlework, What are you trying to do with csfml?
04:34:30silvernode[m]If I define a seq this way: var a = @[], how do I add items to it?
04:36:44FromDiscord<Elegant Beef> you shouldnt be able to declare a sequence like that, as there is no type given
04:37:15disruptekrtfm div operator
04:37:20FromDiscord<Elegant Beef> you can just do `var a: seq[T]` then `a.add(T)`
04:38:37FromDiscord<Elegant Beef> Lol yes read the manual on sequences https://nim-lang.org/docs/tut1.html#advanced-types-sequences
04:38:55silvernode[m]<FromDiscord "<Elegant Beef> you can just do `"> Does it count that I have a struct with a property like this: backpack: seq[Item]
04:39:30silvernode[m]I read that page lol hmm, I must be missing something on that page then
04:40:13FromDiscord<Elegant Beef> the `add` proc adds values
04:41:35silvernode[m]<FromDiscord "<Elegant Beef> the `add` proc ad"> I tried that, I guess I will need to show a code example
04:46:13silvernode[m]https://play.nim-lang.org/#ix=2wLf
04:47:04silvernode[m]oops, I forgot to include my item type
04:47:58silvernode[m]https://play.nim-lang.org/#ix=2wLh
04:48:46FromDiscord<Elegant Beef> well first issue is that you're attempting to mutate character but dont pass it as `player: var Character`
04:48:55FromDiscord<Elegant Beef> Second issue is you're echoing a void proc
04:49:11silvernode[m]ah ok
04:49:21*kinkinkijkin quit (Read error: Connection reset by peer)
04:49:46*kinkinkijkin joined #nim
04:49:48FromDiscord<Elegant Beef> If you notice the error is mismatch got `seq[T], T` and all the expected are `var seq[T], T`
04:51:57silvernode[m]I tried putting proc addToBackpack(var player: Character) but that didn't work either I have the player variable as var originally so I thought that would be all I needed to do.
04:52:14Tangersilvernode[m], Other way around
04:52:22TangeraddToBackpack(player: var Characte)
04:52:34FromDiscord<Elegant Beef> Variables are implictly passed as immutable, you need to specify they're mutable
04:52:45FromDiscord<Elegant Beef> Unless they're references
04:53:03silvernode[m]hmm, I always thought it was var before player since that's the var.
04:53:06TangerAs Character is the type, you're setting the type to a "var Charactaer" (ie mutatable Character model)
04:53:21silvernode[m]<Tanger "As Character is the type, you're"> gotcha
04:53:32TangerTrips me up sometimes as well, haha
05:00:34disruptekclyybber: on windows + arc, there's a set construction like {0..8} -- i think it's file permissions -- that is getting rewritten into a `:tmpD = 0 .. 8` and then expr pukes on the range node.
05:02:33*vicfred quit (Quit: Leaving)
05:15:49*maier joined #nim
05:20:58*maier quit (Ping timeout: 260 seconds)
05:31:45*maier joined #nim
05:32:28*narimiran joined #nim
05:34:28*solitudesf joined #nim
05:36:24FromGitter<StefanSalewski> 17:02:50 voidpi StefanSalewski: I'm reading your book it's helping me a lot thanks
05:37:43FromGitter<StefanSalewski> Great. Let me know if there are sections which I have to improve or to extend. You can use the github issue tracker for that.
05:47:10voidpiStefanSalewski: I found it concise and well written
05:47:31voidpiStefanSalewski: http://ssalewski.de/nimprogramming.html#_binary_numbers the addition is wrong
05:47:49voidpi1001 + 1101 = 11010
05:55:11FromGitter<StefanSalewski> Oh yes, a typo, thanks. Please note that I generally do not follow this IRC/Gitter, too much text for me, have to do some work.
05:56:23FromGitter<StefanSalewski> Bye.
06:00:09voidpiStefanSalewski: understandable
06:01:32voidpiI just tried to use nim to compile a module in debian 10
06:02:03voidpithat thing is 0.19
06:14:06*zyklon joined #nim
06:16:07*uvegbot quit (Ping timeout: 260 seconds)
06:20:48*JustASlacker joined #nim
06:21:40*vicfred joined #nim
06:47:06*PMunch joined #nim
06:50:16*gmaggior quit (Quit: Leaving)
06:54:00PMunchHmm, is there a way to limit the type contained in a generic to be GC-safe?
06:54:13*a_chou joined #nim
06:54:19PMunchI.e. not allow sequences, strings, and other things that require the GC?
06:55:45alehander92concepts?
06:57:12alehander92other option is to just use a compile time function which returns your type
06:57:27alehander92e.g. a: NoGC(MyType)
06:57:42alehander92NoGC checks that MyType doesn't have those with intro
06:57:43PMunchHmm, I guess that would be an option
06:57:45alehander92and just returns it
06:57:52alehander92but i guess concepts / `or`
06:57:57alehander92might be simplr if possible
06:58:05PMunchShould be possible
06:58:27PMunchI don't really have a system in mind, just wondered if it was possible
07:00:34FromDiscord<Elegant Beef> Hey pmunch, dont know if you recall my constructor macro, but i refactored it to be more of smart DSL 😛
07:00:54PMunchOh I remember
07:01:20PMunchDefine "smart DSL", I'm sceptical of things trying to be smart in general :P
07:01:32FromDiscord<Elegant Beef> I mean smart as in more user friendly and compact
07:02:01FromDiscord<Elegant Beef> instead of a single line, it's now multiple lines and an option `_:` which allows you to do logic after constructed
07:02:03FromDiscord<Elegant Beef> https://github.com/beef331/constructor/tree/typeDef
07:02:07PMunchhttps://forum.nim-lang.org/t/5734#35569 <- did we ever get any examples Araq? This topic is still the first thing that comes up when I Google "Nim GC ARC" and some of that information seems a bit dated
07:02:30FromDiscord<Elegant Beef> also made the typedef macro which is still looking for a proper name, which generates properties
07:06:03PMunchHuh, neat
07:08:53PMunchHey, the new colour for Nim has taken effect on GitHub :D
07:09:08FromDiscord<Elegant Beef> Yep happened yesterday in my time 😄
07:09:24PMunchNice!
07:13:14FromDiscord<Varriount> Araq: Views? At last? Is it really true?
07:15:41FromDiscord<lantos> nice we got the royal yellow!
07:18:05*Tuatarian quit (Quit: Quit)
07:18:23PMunchHmm, regarding this part of the documentation for channels: "Note: Channels are designed for the Thread type. They are unstable when used with spawn" does this mean that they'll be unstable in the scenario where my Nim code is compiled into a DLL and the procedures can be called from any thread?
07:23:02*vicfred quit (Quit: Leaving)
07:24:43*a_chou quit (Quit: a_chou)
07:54:56PMunchHmm, has anyone tried to make Nim able to create variant object types without having to specify the enum value?
07:56:05PMunchSomething like `MyType(str: "my string")` would automatically set `kind: String` because it's the only branch with a `str` field
08:06:20*Vladar joined #nim
08:07:41*konkrrrrrr joined #nim
08:08:28AraqPMunch, hmm, all I was able to do is to port Channels to --gc:arc
08:08:45Araqand then I added "Isolated[T]" so that we can write a better channel :-)
08:09:04PMunchIsolated[T]?
08:09:20Araqin fact, I started to write a new threading API but it's much work and there is Weave
08:09:55AraqPMunch, https://github.com/nim-lang/RFCs/issues/244
08:09:56disbot'isolated' data for Nim ; snippet at 12https://play.nim-lang.org/#ix=2sjf
08:10:11*kinkinkijkin quit (Ping timeout: 240 seconds)
08:10:26AraqVarriount: yes it's true
08:10:50FromGitter<alehander92> PMunch i think that would be a bit strange
08:10:53FromGitter<alehander92> i would prefer
08:10:59FromGitter<alehander92> ~String(str: "my string")
08:10:59disbotno footnotes for `String(str:`. 🙁
08:11:05FromGitter<alehander92> if you need to preserve space
08:11:33FromDiscord<Elegant Beef> I think variant inference would be nice, atleast with the current variant implementation where there is no overlapping names
08:12:09FromGitter<alehander92> but this would be harder to read
08:12:21PMunchHighly depends on your type..
08:12:21FromGitter<alehander92> now i need to read the variant's definition
08:12:37PMunchI came across it with my ANSI parsing library
08:12:40FromGitter<alehander92> yeah but why MyType(a: "mystr") vs ~String(a: "mystr")
08:12:54FromGitter<alehander92> in the second case i immediately see what `.kind` i need to check for
08:12:59FromDiscord<Elegant Beef> Cause your type isnt String, it's of MyType
08:13:23FromGitter<alehander92> but `~A` is not a type
08:13:37PMunchI wanted to create a node AnsiData(kind: String, str: someStrData) and AnsiData(kind: CSI, parameters: "0", intermediate: "", final: 'm')
08:13:39FromGitter<alehander92> it's the relevant unique info
08:13:49FromGitter<alehander92> and instead of writing AnsiData
08:13:52FromGitter<alehander92> everywhere
08:13:57FromGitter<alehander92> you just write the relevant kind
08:14:02PMunchIt's pretty obvious which of those is just a string and which is a CSI marker even without the kind field
08:14:05FromGitter<alehander92> more DRY
08:14:19FromDiscord<Elegant Beef> If i have a generic type that takes procs only, is the only method to generate a proc that takes the arguements of the generic macros/templates?
08:14:38PMunchalehander92, that would indeed be cool
08:14:39AraqPMunch, I agree with you but a couple of overloaded constructor procs/templates won't kill you ;-)
08:15:15PMunchAraq, true, this was just something I came across and wondered if anyone else had thought of it :)
08:15:23FromDiscord<Elegant Beef> Re-asking this https://play.nim-lang.org/#ix=2wMB
08:15:59PMunchIn general Nim is very easy to write, and has little friction, but variant types can sometimes feel like you're writing things just to make the type system happy
08:16:14PMunchWhich in general you don't have to with type-inference and such :)
08:16:57Araqthey didn't age all that well but I only had Ada to copy, ML is based on immutable types
08:17:16PMunch@Elegant, you want something like `event.invoke 100`?
08:17:22FromDiscord<Elegant Beef> Yea
08:17:38FromDiscord<Elegant Beef> But without having to manually write the `value: int`
08:18:42PMunchAraq, never too late ;) This is basically just a further kind of type inference, inferring the sub-type of a variant object
08:18:42FromDiscord<Elegant Beef> I was working on a macro to generate a new Type and everything, but figured i'd re-ask now when people are active 😄
08:19:09PMunch@Elegant, I guess you could create a couple of invoke procedures with generics..
08:19:37FromDiscord<Elegant Beef> So write every case out? 😄
08:21:53*gmaggior joined #nim
08:22:42gmaggiorif I have an Obj and an ObjRef how do assign reference of Obj to ObjRef?
08:23:34PMunch@Elegant, something like this: https://play.nim-lang.org/#ix=2wMG
08:24:03PMunchYou can of course create a simple macro to generate those invoke procedures for everything from A..Z or something like that
08:24:05Araqgmaggior, it's impossible, you need to start with an ObjRef then
08:24:05FromDiscord<Elegant Beef> Yea seems like just making a type with the proc is wiser
08:24:34Araqin fact, most of time you should decide upfront if you need 'ref object' or 'object'
08:24:51*bouzu_ joined #nim
08:24:51gmaggiorAraq: thanks
08:25:15FromDiscord<Elegant Beef> That reminds me, i need to go kill my nimcs repo, using ref's for components, that's why you dont write a ECS when new to a language
08:25:52PMunchECS?
08:25:58PMunchEntity component system?
08:26:00FromDiscord<Elegant Beef> Entity Component System
08:26:01FromDiscord<Elegant Beef> Yes
08:26:42FromDiscord<Elegant Beef> Wrote an overly complex/ugly ECS when rather new to nim, coming from C# was like "Must use ref for everything, as it's the only logical way to program"
08:27:24Araqprobably you shouldn't write an ECS at all, write games, not game engines. extract the engine by refactoring working, successful games
08:30:17FromDiscord<Elegant Beef> Oh i was mostly doing it to learn nim, i really dont need ECS since i dont have thousands of entities
08:31:37Araqwell an ECS can be an elegant solution no matter how many entities you have
08:32:21FromDiscord<iWonderAboutTuatara> +1 to araq
08:32:32FromDiscord<iWonderAboutTuatara> and beef
08:32:44FromDiscord<iWonderAboutTuatara> ECS is pretty overhyped for indies
08:32:46FromDiscord<Elegant Beef> Yea completely depends on the ECS implementation though, i'm 100% fine with the structure of a EC system
08:33:05FromDiscord<Elegant Beef> Like from i hear Unity absolutely screwed the pooch with their implementation
08:33:15FromDiscord<iWonderAboutTuatara> Honestly, the unity implementation is fine
08:33:15*hnOsmium0001 quit (Quit: Connection closed for inactivity)
08:33:20FromDiscord<exelotl> > extract the engine by refactoring working, successful games↵Yep 100% this
08:33:39FromDiscord<Elegant Beef> For the most part people never suggest it, they suggest using other C# implementations
08:33:44FromDiscord<iWonderAboutTuatara> Which I agree with
08:34:19FromDiscord<iWonderAboutTuatara> Most of this game advice is targeted towards hobbyists and small time indies
08:34:19FromDiscord<iWonderAboutTuatara> working with an ECS is not really worth it for those kinds of games
08:34:52FromDiscord<iWonderAboutTuatara> If I wanted full performance etc, I'd write my own engine or at use Kha framework
08:35:43*NimBot joined #nim
08:36:10PMunchAnyone with nimsuggest on Windows knowledge knows what might be going on here? https://github.com/PMunch/nimlsp/issues/38
08:36:12disbotLocal modules not discovered ; snippet at 12https://play.nim-lang.org/#ix=2wMK
08:36:42FromDiscord<Elegant Beef> Yea for me there is a big issue of, eh it doesnt help me much so why would i use it. I havent learned the new RPs in Unity either, since they're more limited imo with single render passes and bodges to get multiple passes
08:36:53FromDiscord<Elegant Beef> Like cool games run faster, but my games already ran fast
08:37:52FromDiscord<Elegant Beef> *Oh and we dont have any quick look up for the exposed functions so you can write shaders without starring at hlsl libraries* 😄
08:37:53FromDiscord<iWonderAboutTuatara> URP is genuinely useful
08:38:15FromDiscord<iWonderAboutTuatara> you don't need to know how to write for SRP though, it's not the simplest and it's not super useful
08:38:23FromDiscord<iWonderAboutTuatara> but URP makes my life a fair bit easier
08:38:40FromDiscord<Elegant Beef> The standard RP is fine for my stylized stuff, i've never had a gpu related performance issue
08:39:07FromDiscord<Elegant Beef> My target platform is always desktop though, not that i've published anything 😄
08:39:08*Cadey quit (Ping timeout: 246 seconds)
08:39:33FromDiscord<exelotl> I don't like ECS because it leads to so many questions (are hitbox and velocity separate components? Do they go together in the physics component?) and if you get those questions wrong you lose performance
08:39:46FromDiscord<iWonderAboutTuatara> I go for mobile and web too
08:39:52*Prestige quit (Ping timeout: 260 seconds)
08:40:01*bouzu__ joined #nim
08:40:11FromDiscord<iWonderAboutTuatara> Mobile games play ok on desktop, but usually not the other way around
08:40:13FromDiscord<Elegant Beef> I dont go for mobile as it's a cesspool, and web is atrocious with build times
08:40:27FromDiscord<iWonderAboutTuatara> Web can be a pain
08:40:34FromDiscord<iWonderAboutTuatara> but I've never really had major issues with it
08:40:41FromDiscord<iWonderAboutTuatara> how often are you building anyway though?
08:40:44FromDiscord<Elegant Beef> With nico i can build a webgame within 10 seconds, with Unity it takes 10 minutes
08:40:56FromDiscord<Elegant Beef> *And my cpu is at 100%*
08:41:07FromDiscord<iWonderAboutTuatara> It's not the fastest, agreed
08:41:11FromDiscord<iWonderAboutTuatara> defo not 10m for me though
08:41:21FromDiscord<iWonderAboutTuatara> either way, I don't build very often
08:41:32*Cadey joined #nim
08:41:34FromDiscord<iWonderAboutTuatara> so not a huge deal
08:41:51FromDiscord<iWonderAboutTuatara> Just sort of set it to build, go do something else for 15 minutes
08:41:54FromDiscord<exelotl> (Having concrete 'this is an object which is a monster' is something i find really nice to reason about too)
08:42:15FromDiscord<iWonderAboutTuatara> It can definetely simplify the mental model for some games
08:42:22FromDiscord<Elegant Beef> Well my biggest issue is that if im working on a project i want to build all the builds and upload them whenever i make a commit to the master branch, im ok with 50% of my cpu being used to build 3 build simultanously but a webgl build takes 10 minutes
08:42:30*bouzu_ quit (Ping timeout: 244 seconds)
08:42:47FromDiscord<iWonderAboutTuatara> Do you work with others on these games?
08:42:57FromDiscord<Elegant Beef> On my lastone no
08:43:00*Prestige joined #nim
08:43:03FromDiscord<iWonderAboutTuatara> I have never worked with anyone on a game, so I have no idea if that requires building often
08:43:16FromDiscord<iWonderAboutTuatara> If it's a routine thing I can see it getting annoyign
08:43:26FromDiscord<Elegant Beef> Well it's not even building often, my game was in a playable state so i'd like to have recent builds on github/itch
08:43:27FromDiscord<iWonderAboutTuatara> but usually, people manage exports near the end of their projects
08:43:45FromDiscord<iWonderAboutTuatara> you could keep it as 1 version until you're ready to release the new ver
08:43:51FromDiscord<iWonderAboutTuatara> ah it's a prototyping thing?
08:43:58FromDiscord<Elegant Beef> Yea that's fine for real developers, im not a real developer
08:43:59FromDiscord<iWonderAboutTuatara> how often do you ususally go between releases?
08:44:07FromDiscord<iWonderAboutTuatara> Lmao
08:44:08FromDiscord<lqdev> 10 seconds build time is a pita
08:44:22FromDiscord<Elegant Beef> I mean when working on my last project any commit would build and push to github/itch
08:44:23FromDiscord<iWonderAboutTuatara> I don't really get the hatred for build times and such
08:44:29FromDiscord<lqdev> i bet that like, at least 4 seconds are solely SDL/glfw init
08:44:32FromDiscord<iWonderAboutTuatara> in the editing world peopel have a similar thing for export times
08:44:42FromDiscord<Elegant Beef> Cause whilst building for webgl i cant use my pc, and cant develop
08:44:46FromDiscord<Elegant Beef> It uses all 8 threads
08:44:54FromDiscord<iWonderAboutTuatara> I have no idea how it works in collab stuff
08:45:09FromDiscord<iWonderAboutTuatara> but can't you just use desktop builds till you want to release a version?
08:45:16FromDiscord<iWonderAboutTuatara> then build that for html5?
08:45:28FromDiscord<lqdev> the thing is that for game jam games, quick iteration is important. that's why build times matter
08:45:46FromDiscord<Elegant Beef> I mean ideally i'd have my master branch be the up to date branch, and as im committing there use my hardware to build and upload
08:45:54FromDiscord<Elegant Beef> I can make 3 desktop builds in async before 1 webgl build
08:46:20FromDiscord<iWonderAboutTuatara> Hmm
08:46:27FromDiscord<Elegant Beef> Like desktop builds take 30 seconds, this is why i really like the premise of using nim for game dev on top of the language being nice
08:46:38FromDiscord<iWonderAboutTuatara> Nim is a nice language for sure
08:46:45FromDiscord<iWonderAboutTuatara> I'd look more into nico/nimgame2
08:47:02FromDiscord<Elegant Beef> Are you suggesting to a contributor of nico to look into it more? 😛
08:47:03FromDiscord<iWonderAboutTuatara> but tbh Godot works perfectly well for me
08:47:11FromDiscord<iWonderAboutTuatara> no lol
08:47:16FromDiscord<iWonderAboutTuatara> I'm saying i would look more into it
08:47:22FromDiscord<iWonderAboutTuatara> if I wasn't so content with Godot
08:47:25FromDiscord<Elegant Beef> Ah it's nice for pixel art games
08:47:32FromDiscord<iWonderAboutTuatara> nico or Godot?
08:47:34FromDiscord<Elegant Beef> Nico
08:47:46FromDiscord<iWonderAboutTuatara> ohhh its a pico-8 like
08:47:50FromDiscord<Elegant Beef> Yea
08:47:57FromDiscord<iWonderAboutTuatara> except maybe not?
08:48:09FromDiscord<Elegant Beef> It's pico inspired, with tons of expandabillity
08:48:28FromDiscord<Elegant Beef> It's not limited to 128x128, has 256 colours and ships with an imgui
08:48:59FromDiscord<iWonderAboutTuatara> I think if I were to make a game in Nim, I'd want to build my own engine
08:49:09FromDiscord<iWonderAboutTuatara> idk how far I'd get, but it would be fun
08:49:25FromDiscord<iWonderAboutTuatara> atm though best game framework is heaps for haxe
08:49:30FromDiscord<iWonderAboutTuatara> (imo)
08:49:32FromDiscord<Elegant Beef> Eh not nim, not nice
08:49:41FromDiscord<iWonderAboutTuatara> That's a downside, but it is Haxe
08:49:44FromDiscord<iWonderAboutTuatara> Haxe is nice
08:49:56FromDiscord<lqdev> haxe is verbose
08:49:59FromDiscord<iWonderAboutTuatara> It's probably the best version of a Javalike
08:50:03FromDiscord<iWonderAboutTuatara> so is C#
08:50:11FromDiscord<iWonderAboutTuatara> All the Javalikes are
08:50:26FromDiscord<iWonderAboutTuatara> "everything is a class" scales well but makes things a bit more painful for small things
08:50:29FromDiscord<lqdev> and all the java-likes suck because of that
08:50:33FromDiscord<iWonderAboutTuatara> luckily, games usually aren't small projects
08:50:40FromDiscord<iWonderAboutTuatara> agreed, for smaller things
08:50:40FromDiscord<Elegant Beef> I really want to remake my last game jam in nico, but i didnt work on it solo, so my friend who doesnt know any nim and isnt too enthuised to learn it probably wouldnt like it 😄
08:50:57FromDiscord<iWonderAboutTuatara> honestly I wasn't too into nim at first
08:51:03FromDiscord<lqdev> "everything is a class" just sucks. let me create a function outside of a class ffs
08:51:21FromDiscord<iWonderAboutTuatara> It makes some simple things painful, at the cost of making some painful things simpler
08:51:35FromDiscord<lqdev> this is why i strongly prefer c++ over java or c#, even though it's not a great language
08:51:39FromDiscord<iWonderAboutTuatara> For a game, which is Haxe's primary usecase, I'm ok with that
08:51:58FromDiscord<lqdev> i like it when a language is really freeform
08:52:04FromDiscord<iWonderAboutTuatara> Honestly nowadays a good IDE will take care of a lot of the boilerplate
08:52:10FromDiscord<iWonderAboutTuatara> not ideal, but it's not the worst
08:52:18FromDiscord<lqdev> it will also take care of your RAM
08:52:23FromDiscord<Elegant Beef> What is tonight Haxe night, was talking in another discord about Haxe and how the creator has a studio that uses it 😄
08:52:32FromDiscord<iWonderAboutTuatara> Yeah
08:52:39FromDiscord<iWonderAboutTuatara> Haxe's main usecase is their games lol
08:52:44FromDiscord<tomck> people actually use haxe?
08:52:47FromDiscord<iWonderAboutTuatara> Shiro Games and Motion Twin
08:52:49FromDiscord<lqdev> i'd much rather use vim than an IDE
08:52:55FromDiscord<Elegant Beef> French game devs for some reason
08:52:57FromDiscord<iWonderAboutTuatara> yes, people have used haxe to make some incredibly good and popular game s
08:53:17FromDiscord<iWonderAboutTuatara> Dead cells is the best known
08:53:24FromDiscord<lqdev> dicey dungeons
08:53:24FromDiscord<Elegant Beef> No, northgard is
08:53:29FromDiscord<iWonderAboutTuatara> actually, maybe its papers please
08:53:41FromDiscord<iWonderAboutTuatara> @lqdev That's haxe?
08:53:44FromDiscord<iWonderAboutTuatara> wait what
08:53:45FromDiscord<lqdev> yup
08:53:53FromDiscord<lqdev> pretty sure it is
08:53:55FromDiscord<iWonderAboutTuatara> I thought terry Cavanaugh was the dude who never used any frameworks ever
08:53:58FromDiscord<tomck> ohhhh yeah and northgard, well shoot
08:54:03FromDiscord<iWonderAboutTuatara> and also open sources his games
08:54:10FromDiscord<iWonderAboutTuatara> https://haxe.org/use-cases/games/
08:54:12FromDiscord<lqdev> he created his own framework for haxe called haxegon
08:54:15FromDiscord<iWonderAboutTuatara> Heaps is a very nice game engine
08:54:19FromDiscord<iWonderAboutTuatara> oh makes sense
08:54:26FromDiscord<lqdev> it's based on openfl iirc
08:54:29FromDiscord<iWonderAboutTuatara> Yeah Terry Cavanaugh is a legend
08:54:44FromDiscord<lqdev> vvvvvv is still one of my fav games
08:54:48FromDiscord<iWonderAboutTuatara> Never played
08:54:53FromDiscord<lqdev> too bad
08:54:53FromDiscord<iWonderAboutTuatara> loved dicey dungeons though
08:54:57FromDiscord<iWonderAboutTuatara> Yeah it really is
08:55:19FromDiscord<lqdev> vvvvvv is a really fun game for speedrunning
08:55:20FromDiscord<iWonderAboutTuatara> I was working on a game, and then I realized it was just a worse clone of vvvvvv a while through
08:55:25FromDiscord<iWonderAboutTuatara> I love speedrun games
08:55:26FromDiscord<lqdev> lol
08:55:37FromDiscord<iWonderAboutTuatara> tbh the gravity flipping mechanic is near universal
08:55:45FromDiscord<iWonderAboutTuatara> fairly uninspired game to begin with tbh
08:55:57FromDiscord<iWonderAboutTuatara> Also, I can't do art to save my life,
08:56:12FromDiscord<iWonderAboutTuatara> and I also can't get away with drawing super weird and lowres backgrounds
08:56:36FromDiscord<iWonderAboutTuatara> https://media.discordapp.net/attachments/371759389889003532/752814632317616198/bg.png
08:56:40FromDiscord<iWonderAboutTuatara> is my currect version
08:56:47FromDiscord<iWonderAboutTuatara> *current
08:56:55FromDiscord<iWonderAboutTuatara> which is not usable
08:56:59FromDiscord<iWonderAboutTuatara> like at all
08:57:05FromDiscord<iWonderAboutTuatara> I was hoping this would come out ok, and...
08:57:17FromDiscord<iWonderAboutTuatara> I have no idea how to do art
08:57:19FromDiscord<Elegant Beef> I abuse shaders, to hide my inabillity to art
08:57:30FromDiscord<iWonderAboutTuatara> hard to do that wehn youve got pixel art sadly
08:57:32FromDiscord<Elegant Beef> Nothing lets you hide bad art like good maths
08:57:44FromDiscord<iWonderAboutTuatara> pixel shaders just expose it
08:57:45FromDiscord<Elegant Beef> The joke is im relatively bad at math
08:57:50FromDiscord<iWonderAboutTuatara> oh lmao
08:58:02FromDiscord<iWonderAboutTuatara> same tbh
08:58:04FromDiscord<iWonderAboutTuatara> I
08:58:09FromDiscord<iWonderAboutTuatara> I'm ok, but not amazing
08:58:45FromDiscord<iWonderAboutTuatara> honestly gamedev and programming in general has taught me way more maths than school has
08:59:23FromDiscord<Elegant Beef> But i mean aside from overly bloomy super easy to get away with some simple shapes + cel shading https://streamable.com/ptlyv
08:59:43PMunch@iWonder, don't say that: https://www.youtube.com/watch?v=fy3FvPg01w0
08:59:55PMunchPlenty hiding you can do with shaders on pixel art :)
09:00:42*abm joined #nim
09:00:46PMunchI actually Implemented that and created a program to basically do what SpriteLamp does in Nim at some point. Pretty trivial actually
09:00:48FromDiscord<Elegant Beef> Yea it's all the same logic just different input data
09:01:08FromDiscord<Elegant Beef> Well spritelamp is just using a normal map and a light source to generate lighting
09:01:20FromDiscord<Elegant Beef> Unless you mean the normal map generation
09:01:24PMunchWas planning on making a game about the northern lights with it, but never got around to it..
09:01:47FromDiscord<tomck> I want to store a compiletime var which maps strings to typedescs, is that possible? I'm getting a weird error which I *think* indicates that typedesc is an invalid type to store in a table:↵```↵lib/system.nim(612, 16) Error: invalid type: 'None' in this context: 'proc (s: var seq[KeyValuePair[system.string, None]], len: Natural){.noSideEffect.}' for proc↵```
09:01:58PMunchYeah this was generating the normal map from four shaded images
09:01:58FromDiscord<Elegant Beef> I heavily abused shaders in this to give more interest https://jbeetham.itch.io/cords
09:02:18FromDiscord<iWonderAboutTuatara> PMunch: True, that was very clever use
09:02:32FromDiscord<iWonderAboutTuatara> I'l have to look into it, but idk what to do at this point
09:03:05FromDiscord<Elegant Beef> The thing with shaders is you can just do things and eventually fins omething cool
09:03:20FromDiscord<iWonderAboutTuatara> Agreed, but you have to know glsl to a decent level to get there
09:03:34FromDiscord<Elegant Beef> Can you not say glsl in my presence?
09:03:40FromDiscord<Elegant Beef> That language hurts me
09:03:41FromDiscord<iWonderAboutTuatara> Which is fine, but I'm not th best at shares
09:03:42FromDiscord<iWonderAboutTuatara> lmaooooo
09:03:53FromDiscord<iWonderAboutTuatara> lots of hate for it-that-shall-not-be-named
09:04:08FromDiscord<iWonderAboutTuatara> I think it's ok, if you ignore how horrible it is it's tolerable
09:04:16*gmaggior quit (Quit: Bye)
09:04:51FromDiscord<iWonderAboutTuatara> but I don't really find myself wanting to use it
09:04:59FromDiscord<iWonderAboutTuatara> unlike most other languages
09:05:32FromDiscord<Elegant Beef> Eh my biggest issue is the lack of implict type conversion
09:05:44FromDiscord<iWonderAboutTuatara> It's not a nice language
09:05:48FromDiscord<iWonderAboutTuatara> for sure
09:06:03FromDiscord<iWonderAboutTuatara> it definetely doesn't treat the programmer too well
09:06:10FromDiscord<iWonderAboutTuatara> There's a nim -> glsl DSL
09:06:15FromDiscord<Elegant Beef> I know
09:06:19FromDiscord<iWonderAboutTuatara> Don't know how good it is or isn't though
09:06:26FromDiscord<Elegant Beef> I'd just rather use CG or HLSL
09:06:41FromDiscord<iWonderAboutTuatara> I don't think Godot has very good non-glsl support
09:08:21FromDiscord<iWonderAboutTuatara> or any non glsl support actually
09:08:26FromDiscord<iWonderAboutTuatara> hlsl is supposed to be nice
09:08:39FromDiscord<iWonderAboutTuatara> I don't know anybody that uses cg, so no comment
09:08:49FromDiscord<Elegant Beef> It was Unity's main shader language
09:08:57FromDiscord<Elegant Beef> Also sorry tomck we're so offtopic
09:09:06FromDiscord<iWonderAboutTuatara> lmao
09:09:08FromDiscord<iWonderAboutTuatara> lets migrate
09:09:08ehmryldlework: FWIW the wrapped compiler is in nixpkgs master now
09:09:10FromDiscord<iWonderAboutTuatara> to <#371759607934353448>
09:09:33ldleworksadly doesn't work for me :(
09:11:05FromDiscord<iWonderAboutTuatara> wait a minute
09:11:14FromDiscord<iWonderAboutTuatara> nevermind
09:11:15FromDiscord<Elegant Beef> @tomck ↵> typedesc acts like a generic type. For instance, the type of the symbol int is typedesc[int]. Just like with regular generic types, when the generic param is omitted, typedesc denotes the type class of all types. As a syntactic convenience, one can also use typedesc as a modifier.↵So think the answer is no, but i could be wrong
09:12:02*Tuatarian joined #nim
09:12:29FromDiscord<iWonderAboutTuatara> question: How possible is using a python library in nim?
09:12:37*Tanger quit (Quit: Leaving)
09:12:38*Tuatarian quit (Remote host closed the connection)
09:14:35FromDiscord<Elegant Beef> https://github.com/yglukhov/nimpy
09:14:41FromDiscord<iWonderAboutTuatara> OH
09:14:47FromDiscord<iWonderAboutTuatara> I thought that was numpy for nim!
09:14:56FromDiscord<iWonderAboutTuatara> lmaoo
09:15:20FromDiscord<mratsim> There is also https://github.com/Pebaz/nimporter
09:15:28FromDiscord<mratsim> ah sory it's the other way around
09:16:02FromDiscord<Recruit_main707> What module do you want to use?
09:20:58*Zectbumo_ quit (Remote host closed the connection)
09:28:45FromDiscord<Clyybber> Araq: Do we maybe want to rip openArray out of the backend and turn it into a literal (p: pointer, len: int) tuple?
09:29:38Araqtoo late, already got it to work
09:30:03Araqand it needs special codegen love for toOpenArray slicing etc anyway
09:30:14Araqin the end the refactoring wasn't that much work
09:34:33Zevvwe're not getting real slices, are we?
09:35:36Araqwe are, including borrow checking
09:35:54FromDiscord<dom96> > I heavily abused shaders in this to give more interest https://jbeetham.itch.io/cords↵@Elegant Beef huh, the buttons don't work for me even in the main menu
09:37:13FromDiscord<Clyybber> Araq: Sure, but it adds so much complexity. Why do we need special codegen for toOpenArray slicing?
09:38:06Araqbecause we lack the primitives
09:38:16AraqtoOpenArray is the primitive
09:38:29Araqanyhow, it doesn't add much complexity
09:38:43Araqit's a clean patch IMO
09:38:55FromDiscord<Clyybber> Ok
09:39:07Araq<insert rant here that we don't have an AST code generator>
09:39:25Araqbut that aside, it's just like the older code :-)
09:45:28AraqClyybber: in fact, the complexity arises from the ABI compatibility, we don't map openArray to a struct if it's used as a parameter
09:47:16FromDiscord<exelotl> I'm so excited for this change
09:47:38Zevvwhat does it bring to you then
09:48:05narimiranZevv: he just told you: excitement
09:48:12Zevvfair enough
09:48:13FromDiscord<exelotl> yes!
09:48:58Araqhttps://github.com/nim-lang/Nim/pull/15282/files#diff-8803b947fd0836e22b7b0f67e07b6077
09:48:58disbotborrow checking
09:49:27AraqI think it means we can remove the 'evalOnce' hacks in the stdlib
09:49:45Araqbecause then openArray isn't a weird special case anymore
09:51:59FromDiscord<exelotl> Zevv: I have a lot of code that looks like this in my project: https://media.discordapp.net/attachments/371759389889003532/752828570551844954/unknown.png
09:52:56Zevvright, that should clean up a bit!
09:53:02FromDiscord<mratsim> so now you can put openArray in an object, you can return an openarray from a proc as well?
09:55:20Araqwell it's WIP but yeah
09:55:28AraqI'm writing the spec
09:57:28alehander92hmmm
09:57:32alehander92would this work with strings
09:57:54alehander92e.g. splitting returning an iterator of openarrays
09:58:00alehander92being*
10:01:27FromDiscord<mratsim> That would be a good time for a strutils/sequtils revamp
10:02:01FromDiscord<mratsim> I don't know if iterator-based or range-based is better though, ranges compose better
10:11:38alehander92hm
10:11:44alehander92i wonder : a bit radical
10:12:04alehander92if isNil didn't exist in real code already
10:13:02*pietroppeter joined #nim
10:13:37alehander92would it make sense to make it looser (weaker precedence)
10:13:44alehander92to somehow capture the whole expr before it
10:14:07alehander92so e.g. `if a.b.isNil` just work without need for `if a.isNil or a.b.isNil`
10:14:48alehander92i think timothee already had something like this with a different `?!`
10:15:16FromDiscord<tomck> yeah thanks @Elegant Beef , i just ended up storing the NimNode of the type name
10:15:35alehander92ok https://github.com/nim-lang/Nim/pull/13023 that's it
10:15:36disbot[TODO] wrapnils: allows optional chaining of field access and indexing when LHS i snil ; snippet at 12https://play.nim-lang.org/#ix=26k9
10:17:04*pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
10:17:52*pbb joined #nim
10:25:37FromDiscord<NickSeagull> Hello, just started learning Nim last week! 😊 ↵↵Weird question: Is there a way to create a type in Nim that only exists at the type level, but not at the value level? I mean something like TypeScript's `never` type, or Haskell's `Void` (which is not the regular `void`)
10:29:39FromDiscord<lqdev> what would be the use case?
10:30:27alehander92something that can never be instantiated?
10:31:03FromDiscord<NickSeagull> Yep alehander92, or functions that never return @lqdev
10:31:23*krux02 joined #nim
10:31:34FromDiscord<NickSeagull> Not really useful per se, I like to go through the book "Thinking with types" with each programming language that I pickup to get a grip of the type system 🙂
10:32:08FromDiscord<Recruit_main707> id also like to see a usecase, because they might not be needed
10:32:09alehander92maybe with concepts you can invent a type that never matches
10:32:21*agent0x00 joined #nim
10:32:43alehander92`type Void = concept false` ?
10:33:06FromDiscord<Recruit_main707> i still dont get when is this useful
10:33:14*arecacea1 quit (Remote host closed the connection)
10:33:35FromDiscord<NickSeagull> That could work, could I get a link on concepts alehander92 ?
10:33:43*arecacea1 joined #nim
10:34:29alehander92`concept a\n false`
10:34:41FromDiscord<NickSeagull> @Recruit_main707 there could be a case where you would want to throw, but not specifying which exception the function throws, so you just tag it as `never`/`Void`
10:34:43alehander92the body seems to be on the next line
10:35:09FromDiscord<Recruit_main707> https://nim-lang.org/docs/manual_experimental.html#concepts
10:35:15*krux02_ joined #nim
10:35:23alehander92https://nim-lang.org/docs/manual_experimental.html
10:35:29FromDiscord<NickSeagull> Oooh, that's why I havent found it, thanks folks! 🙂
10:35:41alehander92but concepts seem to be a subject of change
10:36:10alehander92there is a RFC for re-designing them, so sadly i am not sure how easy would it be to have custom expressions
10:36:21FromDiscord<tomck> Hello! I want to create a tuple expression in a macro, what's the AST type for that? (e.g. (1, 2, 3))
10:36:41FromDiscord<NickSeagull> I'll adapt, won't probably use this in prod for now alehander92 , thanks a lot 🙌 ¯\_(ツ)_/¯
10:36:51FromDiscord<tomck> ohhhh nnkpar i see it now, i was looking for an nnktuple, mb
10:37:01alehander92but about `never`: not sure , does ts try to prove that the functions doesn't finish
10:37:07*krux02 quit (Ping timeout: 260 seconds)
10:37:08alehander92sounds like the halting problem in general
10:37:42alehander92if it's just "it can't be assigned anything except another never"
10:38:07FromDiscord<NickSeagull> yep, essentially that, doesn't prove much tbh
10:38:31alehander92then it sounds like
10:38:31FromDiscord<NickSeagull> Haskell's `Void` is much stricter as you cannot return anything at all
10:38:34alehander92nominal typing
10:38:49alehander92because if you just define a type with a name usually you have to assign the same type and name
10:39:08alehander92yeah
10:40:23alehander92well: maybe `distinct void` ?
10:40:33alehander92i tried that, but not sure if it's working correctly
10:40:40FromDiscord<exelotl> oops I managed to make a type that can't be used for anything at all. xD
10:40:45FromDiscord<exelotl> type Never {.error:"Nope.".} = object
10:41:19FromDiscord<NickSeagull> oh, so there's an error pragma, cool 😄
10:41:34alehander92oh i thought about error
10:41:41alehander92but didn't think it can be used like that!!
10:42:41alehander92but not sure how useful would this be .. :D
10:44:00FromDiscord<Rika> i still do not see the use case
10:44:21FromDiscord<exelotl> my type doesn't seem useful at all lol, you can't even mention it anywhere in your code
10:44:54alehander92maybe for deprecation
10:45:04FromDiscord<exelotl> tru
10:45:06alehander92or if it can be somehow
10:45:16alehander92instantiation of a generic for some args which are wrong
10:45:26alehander92it makes sense if you write type-level programs (??)
10:46:05*maier quit (Ping timeout: 240 seconds)
10:46:06FromDiscord<NickSeagull> The two main use cases are for explicitly stating "Can't happen use cases"
10:46:28FromDiscord<NickSeagull> The idea is that you can use it to state that this part of the code won't be called
10:46:31FromDiscord<Rika> dont we already have void
10:47:03*agent0x01 joined #nim
10:47:06alehander92like unreachable?
10:47:14FromDiscord<NickSeagull> exactly alehander92
10:47:14alehander92we have `{.error.}` for that indeed
10:47:18*shirleyquirk joined #nim
10:47:19*a_b_m joined #nim
10:47:27*Trustable joined #nim
10:48:00*MightyJoe joined #nim
10:48:55FromDiscord<Rika> i still do not see the use case, why would that be part of the type?
10:49:25*agent0x00 quit (Ping timeout: 246 seconds)
10:49:44FromDiscord<NickSeagull> sent a code paste, see https://play.nim-lang.org/#ix=2wNZ
10:50:25FromDiscord<Rika> proc absurd[T](x: T) {.error: "This should never happen".}
10:50:28*cyraxjoe quit (Ping timeout: 246 seconds)
10:50:37*abm quit (Ping timeout: 264 seconds)
10:50:50FromDiscord<Rika> any exception is only on run time
10:51:05FromDiscord<Rika> procs are not resolved on runtime
10:51:18FromDiscord<alehander42> yeah so you can alias this to a type i guess
10:51:19*idf04 joined #nim
10:51:49*maier joined #nim
10:52:00FromDiscord<alehander42> i can imagine for stuff like algo working on T
10:52:15FromDiscord<alehander42> if you receive seq[T] it can work for seq[int]
10:52:28FromDiscord<alehander42> but not for something else which is seq[Empty]
10:52:43FromDiscord<Rika> use a restrained generic for that
10:52:58FromDiscord<alehander42> yah
10:53:00FromDiscord<alehander42> yeah*
10:53:01FromDiscord<Rika> proc something[T: SomeInteger](x: seq[T])
10:53:02FromDiscord<alehander42> but in nim people usually seem to just use `{.error.}`
10:53:07FromDiscord<alehander42> or `when stuff: error`
10:53:11FromDiscord<alehander42> or constraints
10:53:45FromDiscord<alehander42> the thing is people usually use compile time code evaluation for complicated logic imho
10:53:56FromDiscord<alehander42> so type-level programming might not be so type-only
10:54:16FromDiscord<Rika> use a concept them
10:54:17FromDiscord<Rika> (edit) 'them' => 'then'
10:55:25FromDiscord<NickSeagull> sent a code paste, see https://play.nim-lang.org/#ix=2wO2
10:55:48*agent0x01 quit (Ping timeout: 260 seconds)
10:56:45FromDiscord<NickSeagull> We could write a type that represents a consumer, which is a stream that never yields:↵```nim↵type Consumer[A, R] = Stream[A, Never, R]↵```
10:56:57FromDiscord<Rika> void
10:57:27FromDiscord<NickSeagull> @Rika so `void` doesn't exist at value level?
10:57:39alehander92you can't write `a: void`
10:57:47FromDiscord<NickSeagull> OOOOOOOOOOH
10:57:48alehander92you can't really have a value with void type iirc
10:57:54FromDiscord<NickSeagull> 😂😂😂
10:58:01alehander92but i mean that's true for C, no?
10:58:08FromDiscord<Rika> you can have proc arguments that are void
10:58:13FromDiscord<Rika> theyre just treated as nonexistent
10:58:14alehander92can you?
10:58:18alehander92in C or in Nim?
10:58:20FromDiscord<Rika> not fields
10:58:22FromDiscord<Rika> just proc args
10:58:25FromDiscord<NickSeagull> Long time since I dont write C, but in TypeScript and Java you can literally do `return void`
10:58:38FromDiscord<NickSeagull> And `void` in that case is a type with cardinality 1
10:58:38alehander92well, huh
10:58:52FromDiscord<NickSeagull> But looks like in Nim its `0` (no values for it exist)
10:58:59alehander92i am not sure because
10:59:05alehander92i think return void for Java is probably just
10:59:09alehander92sugar for return?
10:59:17FromDiscord<Rika> https://nim-lang.org/docs/manual_experimental.html#void-type
10:59:18alehander92if one can't assign it to any variable
10:59:40idf04discard return
10:59:46alehander92huh
10:59:52alehander92why do we have void params
11:00:26FromDiscord<NickSeagull> Ok got it, thanks a lot folks, that was super useful 🙂
11:00:41FromDiscord<NickSeagull> I'm quite hyped up by Nim, it's looking so cool so far 😄
11:00:56alehander92ahhhh
11:01:02FromDiscord<NickSeagull> alehander92: definitely you cant do what I said in Java, I brainfarted
11:01:03alehander92i see, so this generic code works
11:01:11alehander92no problem nick
11:01:20alehander92i don't really know java
11:01:42FromDiscord<NickSeagull> Neither do I
11:03:27alehander92:D :D
11:07:54FromDiscord<tomck> sent a code paste, see https://play.nim-lang.org/#ix=2wO8
11:09:16FromDiscord<tomck> *sigh* never mind i think i just need to use the nnkPar and ignore nnkTupleTy, i think nnkTupleTy has something to do with type decls maybe?
11:09:20FromDiscord<tomck> nnkPar works though
11:14:50narimiran@tomch try to use `dumpAstGen` (or `dumpTree`) with the code you want to produce
11:15:44narimirane.g. https://play.nim-lang.org/#ix=2wOa
11:16:10narimiranafter you click on "run", click on "showing: output"
11:16:19FromDiscord<tomck> ahhh that will help a lot I think, thanks
11:19:29FromDiscord<tomck> cool! this helps a bunch, thanks again
11:20:30FromDiscord<lqdev> @tomck iirc it's nnkTupleConstr not nnkPar
11:20:33*arecacea1 quit (Read error: Connection reset by peer)
11:21:01*arecacea1 joined #nim
11:21:05FromDiscord<tomck> interesting, so nnkPar definitely works, but just based on naming nnkTupleConstr would make sense
11:35:44FromDiscord<lqdev> oh wait you wanna construct a tuple _type_
11:35:45FromDiscord<lqdev> hm
11:36:04FromDiscord<lqdev> TupleConstr is for instantiating tuples
11:36:14*koltrast quit (Ping timeout: 246 seconds)
11:36:56FromDiscord<lqdev> seems like Par is used for tuple types
11:38:53FromDiscord<tomck> i am also using Par for constructing a tuple value
11:44:07*konkrrrrrr quit (Read error: Connection reset by peer)
11:44:41*konkrrrrrr joined #nim
11:46:09*idf04 quit (Read error: Connection reset by peer)
11:58:07*koltrast joined #nim
12:04:30*koltrast quit (Read error: Connection reset by peer)
12:05:01*koltrast joined #nim
12:06:02*supakeen quit (Quit: WeeChat 2.9)
12:06:23*snowolf quit (Remote host closed the connection)
12:06:37*supakeen joined #nim
12:07:20*bouzu__ quit (Quit: Leaving)
12:08:04*snowolf joined #nim
12:08:12PMunchI think nnkTupleConstr is used in a typed context, while nnkPar is used for untyped nodes
12:08:31PMunchBecause as it is untyped Nim doesn't yet know that you're constructing a tuple
12:11:06PMunchWell isn't this a nice signature :P `iterator entries(table: TerminalTable, sizes: seq[int]): iterator(): iterator(): tuple[key: int, val: string]`
12:15:39*Kaivo joined #nim
12:21:46narimiranyo dawg....
12:21:59PMunchHaha :P
12:22:17PMunchBasically I just wanted to give the user a way to output things between the rows and columns of the table
12:32:42*lritter joined #nim
12:54:48*dddddd quit (Ping timeout: 260 seconds)
13:02:59*maier quit (Ping timeout: 240 seconds)
13:03:50ForumUpdaterBotNew thread by Mrhdias: Is there any PWA (Progressive Web Apps) framework or package written in nim?, see https://forum.nim-lang.org/t/6786
13:07:47FromDiscord<bebrws> sent a code paste, see https://play.nim-lang.org/#ix=2wPa
13:13:24FromDiscord<Rika> backwards index?
13:17:47*dddddd joined #nim
13:27:44FromDiscord<bebrws> Ahh thank you!
13:29:35FromDiscord<bebrws> So that is a sequence operator? I see that valStack is ```var↵ pStack: seq[string] = @[]```
13:29:52FromDiscord<bebrws> And not sure what that means actually in terms of a sequence
13:30:08FromDiscord<bebrws> sent a code paste, see https://play.nim-lang.org/#ix=2wPn
13:31:22FromDiscord<Rika> ^1 is last, ^2 is second last, etc
13:31:29FromDiscord<Rika> i assume
13:31:48FromDiscord<Rika> so yeah someseq[^1] is "get last in the seq"
13:33:00FromDiscord<bebrws> O ok
13:33:03FromDiscord<bebrws> That makes sense
13:33:18FromDiscord<bebrws> sent a code paste, see https://play.nim-lang.org/#ix=2wPp
13:36:50PMunchHmm, it doesn't seem to like the nested iterators: http://ix.io/2wPr
13:37:18PMunchhttp://ix.io/2wPs/nim
13:37:49PMunchThe compiler that is
13:37:58disruptekcompilers are made to be broken.
13:38:06PMunchWorked fine when I had it as a top level snippet
13:38:13PMunchBut in my procedure it brokee
13:43:03*agent0x01 joined #nim
13:44:51FromDiscord<vieru> i have a 32bit exe↵how to know if host os is 32 or 64bit ?
13:45:12disruptekdoes it run?
13:45:57FromDiscord<vieru> u talking with me ?
13:46:12disrupteki don't see anyone else here.
13:46:44FromDiscord<vieru> well i saw you talking with pmunch bout something broken
13:46:54FromDiscord<vieru> it does run
13:47:05disruptekpmunch doesn't count.
13:47:16disruptekanalysis reveals that we don't speak to each other.
13:47:26disruptekokay, your system is unlikely to be 16bit.
13:47:51FromDiscord<Rika> lol
13:48:00FromDiscord<vieru> ok lol
13:48:05PMunchEy, we speak to each other from time to time disruptek :P
13:48:05*narimiran quit (Ping timeout: 256 seconds)
13:48:12FromDiscord<vieru> thanks i guess
13:48:16FromDiscord<vieru> lol
13:48:28disruptekyeah, but zevv's irc graph says we usually don't.
13:48:32disruptekmight be a timezone thing.
13:48:40FromDiscord<NickSeagull> @vieru depends on the OS. If on Linux, try `uname -a` , if on Windows, `Windows + X` -> click system -> You will see it under device specifications, system type
13:48:56FromDiscord<NickSeagull> Not sure about MacOS right now
13:48:59FromDiscord<Rika> i think they mean
13:49:01FromDiscord<Rika> via code
13:49:03disruptektry running it twice in a row.
13:49:07FromDiscord<NickSeagull> Ah right rofl
13:49:09FromDiscord<vieru> yeah
13:49:13disruptekif that works, you might have a 32bit machine.
13:49:15FromDiscord<vieru> its windows omly
13:49:23disruptekthen who cares what it is?
13:49:26FromDiscord<vieru> disruptek stop trolling me
13:49:27FromDiscord<Doongjohn> check the size of int?
13:49:32FromGitter<alehander92> disruptek
13:49:37FromGitter<alehander92> stop trolling him!
13:49:40disruptekwut
13:49:54FromDiscord<NickSeagull> @vieru you could do a system call to `wmic OS get OSArchitecture`
13:50:01disrupteksee if sizeof(int) == 4 or sizeof(int) == 8
13:50:37FromDiscord<vieru> nope, checking the size of the int will only say that the exe is 64bit or 32bit
13:50:48FromDiscord<Doongjohn> oh
13:50:50FromDiscord<vieru> (edit) 'that' => 'if'
13:51:20disruptekyou mean you want to check if the host can run the 32bit exe?
13:51:26FromDiscord<dk> https://nim-lang.org/docs/manual.html#statements-and-expressions-when-statement
13:51:36FromDiscord<dk> it says "system" in the example
13:51:42FromDiscord<dk> not "binary"
13:52:09FromDiscord<vieru> my os is 64bit and the exe is 32bit ↵sizeof int is 4
13:52:16disrupteki don't know how you can determine if the kernel can invoke a 32bit executable; if it's 64bit, that doesn't mean it supports 32bit.
13:52:29disruptekprobably you need to make a syscall.
13:52:30FromDiscord<vieru> and when i compile it 64bit↵sizeof int is 8
13:52:45PMunchArgh, super annoying that the double iterators doesn't work..
13:52:47FromDiscord<dk> ok then, the manual is somewhat confusing
13:53:06FromDiscord<vieru> > you mean you want to check if the host can run the 32bit exe?↵@disruptek[IRC]#0000 ↵i mean how can i know the arhitecture of the host os
13:53:26disruptekwithout compiling anything?
13:53:42disruptekmaybe the platform module works in nimscript.
13:54:12FromDiscord<vieru> within the code i mean
13:54:37FromDiscord<Rika> wait
13:54:42FromDiscord<Rika> this might be an xy issue
13:54:45FromDiscord<vieru> is there somthing like os.host.arhitecture ?
13:54:49FromDiscord<Rika> whats the issue you're trying to solve
13:54:53disruptekthere's the platform module.
13:55:20shirleyquirkSo you want to run something... In your code... To see if your code runs? That's like the opposite of the halting problem
13:56:04FromDiscord<vieru> no dudes lol ↵im trying to find out the arhitecture of the os my code is running
13:56:12FromDiscord<vieru> that,s all
13:56:15FromDiscord<Doongjohn> does this work in nim? https://stackoverflow.com/questions/1288189/elegant-and-safe-way-to-determine-if-architecture-is-32bit-or-64bit
13:57:40FromDiscord<vieru> > there's the platform module.↵@disruptek[IRC]#0000 ↵i googled it but i can't find it
13:57:49disrupteksee compiler/platform.
13:58:44PMunchCan you even run a 32-bit program on a 64 bit system without having the system hiding the fact that it is 64-bit?
13:58:51PMunchTo the degree where it would be impossible to detect
14:00:15FromDiscord<Rika> from doong's link, `on linux you can query the proc filesystem whereas on windows you can query the register. `
14:00:41disruptekjust ask your mom.
14:02:46FromDiscord<Doongjohn> well I found this for windows [GetNativeSystemInfo](https://docs.microsoft.com/ko-kr/windows/win32/api/sysinfoapi/nf-sysinfoapi-getnativesysteminfo?redirectedfrom=MSDN)
14:02:58FromDiscord<vieru> > see compiler/platform.↵@disruptek[IRC]#0000 ↵that doesnt help
14:04:19FromDiscord<vieru> is processor arch same as os arch ?↵i mean you can install 32bit windows on a 64bit processor
14:04:31FromDiscord<vieru> so that wouldn't really help
14:04:32shirleyquirkOr fork a process, compile and run ``return sizeof(int)`` with whatever standard GCC is?
14:04:57shirleyquirkThat will be same as os, not necessarily architecture
14:05:33FromDiscord<vieru> sizeof int doesn't help, it only shows the exe's architecture
14:05:59FromDiscord<Rika> whats the reason you want to get the os's arch
14:06:56FromDiscord<vieru> registry specific code
14:07:06FromDiscord<vieru> on windows
14:07:41FromDiscord<vieru> 64bit os and 32bit os have somewhat different registry path's
14:07:43FromDiscord<vieru> (edit) 'path's' => 'paths'
14:08:41FromDiscord<Doongjohn> why not just build 2 exe?
14:09:22FromDiscord<vieru> i don't wanna build my app 2 times just for some different strings
14:09:53FromDiscord<Doongjohn> hmm does this help? https://stackoverflow.com/questions/50978180/programmatically-detect-cpu-architecture-at-runtime
14:10:05FromDiscord<Rika> https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsysteminfo
14:10:39FromDiscord<vieru> sent a code paste, see https://play.nim-lang.org/#ix=2wPL
14:11:09FromDiscord<Rika> they said their exe is strictly 32bit only
14:12:45FromDiscord<vieru> @Rika that might help just a bit but 64bit processors can have a 32bit os installed, right ?
14:12:58FromDiscord<Rika> https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getnativesysteminfo?redirectedfrom=MSDN
14:13:06FromDiscord<Rika> this one is better
14:13:37*maier joined #nim
14:14:25FromDiscord<vieru> https://docs.microsoft.com/en-us/windows/win32/api/wow64apiset/nf-wow64apiset-iswow64process2
14:14:29FromDiscord<vieru> this might be it
14:14:47FromDiscord<vieru> `Determines whether the specified process is running under WOW64; also returns additional machine process and architecture information.`
14:14:59FromDiscord<vieru> if its running under wow64 than os is 64bit
14:15:09FromDiscord<vieru> (edit) 'than' => 'then'
14:15:16FromDiscord<vieru> if not os is 32bit
14:15:30shirleyquirkhttps://stackoverflow.com/questions/869783/windows-64-bit-registry-v-s-32-bit-registry seems to suggest you need two keys/paths, if your exe is 32 bit it doesn't matter if you can detect that the system is 64, you can't access the 64bit keys and vice versa if I'm reading that correctly
14:16:15FromDiscord<Rika> theyre only using a 32bit binary
14:18:09FromDiscord<vieru> i'm trying to edit that startup key in registry
14:18:14shirleyquirkIm asking now, cuz this is new to me, but it sounded like 32bit apps running in 32bit os have the same path as 32bit running in 64
14:18:41shirleyquirkOhhhh I get it. Thanks
14:20:21FromDiscord<vieru> `SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run`
14:20:42FromDiscord<vieru> isn't this affected by the fact that my exe is 32bit and running on a 64bit os ?
14:26:42FromDiscord<vieru> `On 64-bit Windows, portions of the registry entries are stored separately for 32-bit application and 64-bit applications and mapped into separate logical registry views using the registry redirector and registry reflection, because the 64-bit version of an application may use different registry keys and values than the 32-bit version. There are also shared registry keys that are not redirected or reflected.`
14:35:11*xet7 quit (Remote host closed the connection)
14:38:19*agent0x01 quit (Ping timeout: 246 seconds)
14:39:07*superbia joined #nim
14:45:09FromDiscord<Ricky Spanish> how does thread safety for dictionaries and things work out for nim on windows/linux, they invoke the appropriate calls to the native underlying os to handle the mutex's etc by default?
14:45:25disrupteknah.
14:45:27*waleee-cl joined #nim
14:46:10*a_chou joined #nim
14:49:11*natrys joined #nim
14:49:50*konkrrrrrr quit (Read error: Connection reset by peer)
14:51:58*haxscramper joined #nim
14:52:18*endragor joined #nim
14:55:38*drewr quit (Quit: brb)
14:56:46*arecacea1 quit (Remote host closed the connection)
14:57:20*arecacea1 joined #nim
14:58:46*hnOsmium0001 joined #nim
14:59:29*drewr joined #nim
15:00:21FromDiscord<19> my noob attempt at nim pointer arithmetic, crashing: https://play.nim-lang.org/#ix=2wQ3
15:01:12FromDiscord<19> that one doesn't crash, this one does: https://play.nim-lang.org/#ix=2wQ7
15:01:16*kinkinkijkin joined #nim
15:01:39FromDiscord<lqdev> @19 you're setting it constantly to the first row instead of incrementing the pointer by pitch
15:03:56FromDiscord<19> im incrementing by the pitch in the last line
15:05:47FromDiscord<lqdev> you're doing row = pitch + 1
15:05:55FromDiscord<lqdev> not row = row + pitch
15:06:08FromDiscord<lqdev> (ofc. excluding all the casts)
15:08:49FromDiscord<NickSeagull> What's the time of type checking generic procs? In theory, this code shouldn't compile, but it does:↵```nim↵proc example*[A, B, C](f: proc (x: (B, C)): A, x: (B, C)): A = 3↵```
15:09:23FromDiscord<NickSeagull> The correct body of that proc should be `f(x)`
15:09:47FromDiscord<Rika> compile time
15:10:02solitudesfthey are checked when they are instantiated
15:10:27FromDiscord<Rika> i dont see whats wrong
15:11:32FromDiscord<NickSeagull> Right, lemme change it, wrote it incorrectly:↵```nim↵proc example*[A, B, C](f: proc (x: (B, C)): A, x: (B, C)): A = f(3)↵```
15:11:47alehander92Nick
15:11:50FromDiscord<NickSeagull> @Rika that does compile, whereas `f` takes a tuple as a parameter
15:11:54alehander92they are only checked
15:11:57alehander92when instantiated
15:12:07FromDiscord<Rika> only checks when its used is what they mean
15:12:12FromDiscord<NickSeagull> yeah yeah
15:12:15FromDiscord<Rika> because of dead code elim afaik
15:12:16FromDiscord<NickSeagull> Didnt read lol
15:12:18alehander92exactly yeah
15:12:32disruptekno, because that's how generics work.
15:12:47FromDiscord<NickSeagull> Is there a workaround to check it is correct? I guess a doctest or smth?
15:12:51alehander92well , one could on theory typecheck the body in some more generic fashion
15:13:01alehander92but that's how it's done in nim
15:13:13FromDiscord<NickSeagull> alehander92 how would that be?
15:13:37FromDiscord<NickSeagull> I'm just checking the limits of the language and playing a bit, so not really focusing on having prod or pretty code right now
15:14:06alehander92i mean in another language one could do that
15:14:15alehander92but i think what nim does is monomorphization (??)
15:14:41FromDiscord<NickSeagull> ah, I thought there was a hacky way of doing so with pragmas or so
15:14:47FromDiscord<NickSeagull> Thanks 🙂
15:16:05alehander92well, you can just make sure the function is used
15:16:46FromDiscord<NickSeagull> Would adding a `runnableExamples` block would work?
15:17:26alehander92i think those run only in `nim doc`, and have no idea how this works with generics, sorry
15:17:40FromDiscord<NickSeagull> Got it, will try then 🙂
15:17:41alehander92you could do `if false: call()`
15:17:58alehander92if you just want to ensure you call it but seems hacku
15:19:37alehander92or `discard call[<types>]`
15:20:26FromDiscord<NickSeagull> Oh, that last one works perfectl
15:20:27FromDiscord<NickSeagull> (edit) 'perfectl' => 'perfectly'
15:20:37*shirleyquirk quit (Ping timeout: 264 seconds)
15:20:49Araqreally? never tried that "idiom" :-)
15:20:58Araqinteresting. and good to know that it works
15:22:41FromDiscord<NickSeagull> Araq: When the body is properly type checked, then it errors complaining about args not provided, but at that point its already unneeded 🙂
15:22:53alehander92well this probably doesn't generate anything additional in C codegen i hope
15:25:10alehander92huh yeah it says illegal discard proc
15:25:48Araqyeah we added this special case to prevent bugs
15:25:58alehander92yeah i see the comment now
15:26:48alehander92i guess `let _ = call[..]` does the same anyway
15:29:21Araqjust like alehander92 likes it, scream "I'm confused and bug!" and you can always add a special case, no question asked. And we made the world a little better by nurturing people to think even less when they are programming.
15:29:30FromDiscord<NickSeagull> In case someone is curious, here are the weird things I've been doing: https://github.com/NickSeagull/nim-twtypes/blob/master/src/nim_twtypes/ch01_algebra_behind_types.nim
15:29:30alehander92but whan can always just add a sugar `instantiate a[int]` or something for debugging
15:32:59Araqit's time to take my April fool's joke seriously and add machine learning to some Nim linter
15:33:51FromDiscord<haxscramper> Automatically generate commit messages by diffing AST before and after commit
15:33:56alehander92Araq i was just proposing fun hacks :))
15:34:15FromDiscord<haxscramper> Well, I'm planning to write this one
15:34:34alehander92haxscramper well you just know i almost did this exact project
15:34:49alehander92but i decided project managers might use it for some kind of time tracking system
15:35:17FromDiscord<haxscramper> I mean, it is pretty easy if you don't go into semantics, and allows you to ask useless questions such as 'where this argument was I introduced'?
15:35:59*agent0x01 joined #nim
15:36:03FromDiscord<haxscramper> But mostly it is useful for auto-generating detailed changelogs for relatively simple API
15:37:09alehander92i think it's best to
15:37:19alehander92collect your notes into a separate file
15:37:35alehander92and when one's ready to commit, to just review them as a message
15:37:37FromDiscord<haxscramper> Although I'm just evaluating different ideas for compiler error messages - specifically type mismatches: I want to have 'here is your input', 'we expected this', 'the difference is highlighed in red.
15:37:55alehander92are you writing a language
15:38:04FromDiscord<haxscramper> No
15:38:16disruptekyou can just do this by rolling git directly and parsing the nim.
15:38:16disrupteki'm sure it'd be much faster, and you could use it on any code.
15:38:17disruptekleorize and i were talking about doing semver automatically by trawling the docgen output.
15:38:18disruptekit makes some kinda sense.
15:38:19disrupteki only have two notes, though.
15:38:20disruptekit's like,
15:38:21disruptekAIAAAIEIIIIIIEEEIEEIEIEEEEEE and then it goes up at the end.
15:38:42FromDiscord<haxscramper> It's the same discussion from couple of weeks ago, about metter error messages in nim compiler
15:38:45alehander92how did you manage to write a book in one minute dude
15:39:02alehander92there were many ideas about type mismatch error messages
15:39:07alehander92so review old issues first
15:39:38FromDiscord<haxscramper> I think I have good enough idea, but don't have time to write RFC or POC implementation
15:40:09disruptekhow does elm do it? a stack?
15:40:38FromDiscord<haxscramper> And I kind of want to first finish sourcetrail thing so I don't have to dig through all compiler source code as much
15:41:06alehander92wow are you adapting sourcetrail
15:41:51FromDiscord<haxscramper> > you can just do this by rolling git directly and parsing the nim.↵That's exactly what I wanted to do. Get tree for two commits, diff them, report mismatches.
15:42:27alehander92Araq but what is bothering me, literally you introduced a `lets make discard proc a special case to help people not make bugs` case
15:42:55alehander92it's not really fair to go and rant about special cases exactly at that point :D
15:43:21FromDiscord<haxscramper> alihander92: sort of. I'm still not sure what exactly I want to do who hcparse, so I decided to wrap sourcetrail db writer (which is relatively small) and make fixes to hcparse as I go
15:43:52*kinkinkijkin quit (Read error: Connection reset by peer)
15:44:43*kinkinkijkin joined #nim
15:44:48disruptek!repo gittyup
15:44:48disbothttps://github.com/disruptek/gittyup -- 9gittyup: 11higher-level libgit2 bindings that build upon nimgit2 15 4⭐ 1🍴
15:44:58disruptekit works really well.
15:45:01alehander92(ok krux02 did it, but it's still a good idea imo)
15:47:25*vicfred joined #nim
15:47:39haxscramperdisruptek: I pushed fixes to gram, and [email protected] don't have issues with pure enums.
15:47:55disruptekoh cool.
15:48:29FromDiscord<lqdev> poor guy who just got pinged on discord.
15:49:01FromDiscord<lqdev> @Yardanico
15:49:04haxscramper`@ 0 . 2 . 3`
15:49:07alehander92come on what's in python's discord with all the `@decorators`
15:49:16FromDiscord<lqdev> hehe
15:49:24FromDiscord<lqdev> they probably aren't using ircord 😉
15:49:33haxscramper`s k i p l i s t s @ 0 . 2 . 3`
15:49:42alehander92imagine `@ all`
15:49:58FromDiscord<lqdev> rather, at everyone
15:50:03alehander92ahh ok
15:50:22disruptek@all like this?
15:50:23alehander92or ruby and all the `@field`
15:50:38disrupteki'm sure yard ignores it.
15:51:30FromDiscord<lqdev> you also pinged a random person XD
15:51:54FromDiscord<For Your Health> What is a good way to call some cleanup code when some object goes out of scope? I'm getting this error message with `=destroy` about a previous declaration was constructed implicitly.
15:52:23disrupteklet's see the message.
15:52:44FromDiscord<lqdev> yardanico if you could change the search query to `username.startsWith(pingedName & ' ')` rather than just `username.startsWith(name)`
15:53:49FromDiscord<For Your Health> I'm trying to make a wrapper around the sdl2 wrapper and call some cleanup code. I get the error message: `cannot bind another '=destroy' to: Window; previous declaration was constructed here implicitly: `
15:54:22disruptekmaybe your =destroy isn't in the same file?
15:54:28*agent0x01 quit (Ping timeout: 260 seconds)
15:54:48disrupteknim creates a =destroy for you but you may need to define it higher in the file, or predeclare it.
15:55:07disruptekthey should be limited to the module where the type is defined, iirc.
15:55:32FromDiscord<For Your Health> sent a code paste, see https://play.nim-lang.org/#ix=2wQp
15:56:04disrupteki would expect that to work.
15:56:53FromDiscord<For Your Health> actually it does if I comment out this method that is in between those two things. Hmm, gotta figure out what's wrong with that method I guess
15:57:03disruptekjust the order.
15:58:42FromDiscord<For Your Health> Yeah it seems to be the order. So I guess the destructor should always be above the other methods?
15:59:11disruptekit has to be defined before it is used. if it is not defined at the point where it is used, nim will define it.
15:59:24disruptekif nim beats you to the punch, you get the error.
15:59:53FromGitter<kaushalmodi> Hello all! (just dropped in to say hello :)). I haven't been much active around here lately, but I am still using Nim.
16:00:02disruptekawww sup bud
16:00:07FromDiscord<For Your Health> That makes sense. The offending procedure was a helper to initialize the sdl window and return a wrapper.
16:00:24FromGitter<kaushalmodi> disruptek: Not much; just work's keeping me busy.
16:00:25FromDiscord<For Your Health> So I guess nim needed to make a destructor implicitly to facilitate that
16:00:46FromGitter<kaushalmodi> The stuff that I had set up using Nim is still alive and kicking (talks about the stability of Nim)
16:01:54*agent0x01 joined #nim
16:02:02FromDiscord<For Your Health> Nim as a language has some cool ideas. I hope it gains popularity.
16:02:35FromDiscord<For Your Health> It seems like a good candidate for game dev but there aren't many resources for that yet.
16:02:42disruptekkaushalmodi: are you still writing nim?
16:03:38FromGitter<kaushalmodi> disruptek: Not as much, but I still do. Main reason is that I'm too busy with my domain languages lately (SystemVerilog and SystemC).
16:04:38disrupteknice. i think that's a good result in any event.
16:04:46*maier quit (Ping timeout: 246 seconds)
16:05:00shashlickany feedback on this suggestion - https://github.com/nim-lang/nimble/issues/515
16:05:02disbot[Feature] Allow specifying name for the binary in binary packages
16:05:02alehander92what is SystemC
16:05:36FromGitter<kaushalmodi> SystemC is kind of like a C++ library, but for hardware (ASIC) modeling and verification
16:05:37disruptekshashlick: from the title it makes no sense. we already have the means to do this using project.nim.cfg.
16:06:24disruptekshashlick: what's wrong with `--out`?
16:06:40FromGitter<kaushalmodi> shashlick: I thought that nimble was now naming binaries foo.out? or something like that?
16:06:58FromGitter<kaushalmodi> .. if a dir with the "foo" name already existed
16:08:01disruptekthat's nim's department.
16:08:36shashlickSounds fair, I'll test it and close issue with that suggestion
16:09:08shashlickBut this would be one stop shop
16:09:18disruptekdoesn't matter to me.
16:09:23shashlickActually nimble won't know that the binary name is different
16:09:32shashlickInstall will fail
16:10:07disruptekwhy does nimble need to know?
16:10:14shashlickEven if it gets copied over, won't get added to bin
16:10:32shashlick$nimbleDir/bin
16:10:37disruptekno comment.
16:11:00*krux02_ quit (Read error: Connection reset by peer)
16:11:20shashlickReminds me of my 4th grade teacher - no comments boys, no comments
16:12:22*krux02 joined #nim
16:12:28*a_chou quit (Ping timeout: 246 seconds)
16:13:36disrupteknimble /should/ update the project.nim.cfg with the *--out* setting, but i suppose it won't.
16:14:29shashlickThat would be the right thing to do
16:14:50disruptekwe said we didn't want to edit those files, though. 🤷
16:14:51shashlickThat would inform Nim to keep the same behavior
16:14:55disruptekright.
16:15:02haxscramperdisruptek: I just installed new skiplists 0.2.3 - and issue with `undeclared identifier: 'Equal'` still exists.
16:15:02haxscramper`
16:15:19disruptekin a sense, it's the correct design -- we push intelligence towards the compiler from the pm.
16:15:28shashlickNo idea man, it's just a mess when tools start tweaking hand written files
16:15:38disruptekhaxscramper: i thought you said it was fixed? i cannot repro it since i exported skiplists.cmp.
16:16:12haxscramperI said it was fixed because when I tested it with cloned skiplists I had no issues
16:16:16disruptekshashlick: maybe we could use @if in nim.cfg to set the out?
16:16:29disruptekhaxscramper: are you sure you're using 0.2.3?
16:17:38haxscramperYes, `nimble install https://github.com/disruptek/[email protected]`. I will now try using local cloned repo instead of globally installed.
16:18:17disruptekwell, i don't support nimble.
16:18:30disruptekit's too complex for my little brain.
16:19:44shashlickdisruptek: what would be in the @if
16:20:24disrupteksomething to test whether the input is foo.nim and then set out= accordingly.
16:22:49FromDiscord<Rika> lol the bot translated the `@branchname` part of haxscramper's message to a discord ping
16:26:33*agent0x01 quit (Ping timeout: 260 seconds)
16:26:34haxscramperdisruptek: I tested with `d81f880` - the issue is still here. Don't know why it didn't trigger when I tested it earlier.
16:27:58haxscramperThe test compiles fine, but when I try to use it in my code I get this error.
16:29:03disruptekis the code public?
16:29:33disruptekcan you reproduce it without nimble?
16:32:46haxscramper(1) not right now, (2) no. With cloned master gram **and** skiplists there is no errors.
16:33:14disruptekwell, yeah, we need a gram release.
16:33:17disrupteki'll bump it.
16:34:09disruptek0.1.2 is money
16:35:15haxscramperWorking now
16:35:21*disruptek cheers.
16:35:32disruptektags for the win.
16:43:36disruptekleorize[m]: you around? trying to debug your visibility test under mangling and can't figure out why it fails.
16:46:35alehander92:O
16:46:47alehander92disruptek, you using hashTree ?
16:46:53alehander92for mangling
16:46:59disrupteknah.
16:48:59*pietroppeter quit (Quit: Connection closed for inactivity)
16:52:31disruptekactually, that might be the problem.
16:54:52*pietroppeter joined #nim
16:56:32shashlickhttps://blog.doist.com/decision-making-flat-organization/
16:56:42alehander92false positives
16:56:47alehander92is this bad
16:59:30*superbia quit (Read error: Connection reset by peer)
16:59:36*superbia1 joined #nim
17:00:29disruptekwhat are you talking about?
17:02:38alehander92i
17:02:52alehander92my analysis is confusing builtint result with shadowing var result
17:04:34disruptekone is a skResult and the other isn't.
17:05:09Prestigeoh the nim color finally changed on github
17:05:21Prestige\o/
17:05:30disruptekno, it has always been yellow.
17:06:33alehander92awesome !
17:11:44FromGitter<kaushalmodi> It was green earlier
17:12:00disruptekimpossible. i would have noticed.
17:13:12alehander92thanks, it fixed my issue disruptk
17:13:20disrupteknice.
17:20:49FromDiscord<queersorceress> the language color for Nim use to be a dark green on github
17:20:57disrupteknope.
17:21:12disruptekyellow. always has been.
17:21:23FromDiscord<queersorceress> i dunno what to tell you, but that isn't true, lol
17:22:09disruptekask anyone.
17:22:55FromDiscord<iWonderAboutTuatara> Disruptek is correct
17:23:06Prestigehm it's still green on gitea
17:23:54disruptekyou must have a colorblind mode toggled.
17:25:46FromDiscord<Rebel> @queersorceress you are correct it was dark green and just updated for people yesterday to swift's color basically lol
17:25:51FromDiscord<Rebel> scroll up and you can see more about it
17:26:05disrupteklies.
17:26:24FromDiscord<iWonderAboutTuatara> It was never anything other than yellow
17:26:32FromDiscord<iWonderAboutTuatara> I'm really confused @Rebel
17:26:43FromDiscord<Rebel> scroll up
17:26:46FromDiscord<Rebel> I don't have time to reexplain it
17:26:57disruptekiwonder: ignore them; they are just gaslighting you.
17:27:08FromDiscord<Rika> yall are bullies xdddd
17:28:18FromDiscord<Rebel> You were there Rika don't you remember?
17:28:48FromDiscord<queersorceress> tbh i really dislike the new color cuz it reminds me of swift which is why i started coding in Nim in the first place, so i didn't have to make myself learn swift.
17:30:47FromDiscord<Rebel> well if you scroll up you will see the origin story it was always meant to be orangeish just took a while to get updated into Github
17:32:54PrestigeWhat's Nim's color: FFC200?
17:34:20Prestigelooks like that on github but #ffe954 on nim-lang.org
17:36:27FromDiscord<Rebel> Is there research into the different garbage collectors nim offers and use cases among them? Or is it just trial and error with the gcs and see which one leads to the greatest performance?
17:40:34disruptekrebel: what is your application?
17:41:56FromDiscord<iWonderAboutTuatara> I'll be sure to ignore them disruptek, thanks for having my back
17:42:17disruptekthere are a lot of trolls on this channel.
17:42:25ZevvI'm not!
17:43:22disruptekwhat else would a troll say?
17:44:05*superbia1 is now known as superbia
17:44:05*kinkinkijkin quit (Read error: Connection reset by peer)
17:44:43*kinkinkijkin joined #nim
17:46:05FromDiscord<Rebel> my application entails async http communication, a good amount of json, and threadpools as well as some dynamic loading for windows dlls
17:46:15FromDiscord<mu_studio> hello everyone
17:46:19disrupteksup
17:46:50disruptekrebel: stick with refc until you have performance problems, then arc will have an answer.
17:47:07FromDiscord<Rika> will async be good for arc some day?
17:47:24disrupteksome day? maybe.
17:47:41disrupteki am personally biased towards cps, of course.
17:47:52Zevvget to work then, lazy man
17:48:03disrupteki'm working on hcr.
17:48:05disruptekit's dumb.
17:48:26disrupteksmack clyybber and get him to fix sym subst bugs in the compiler.
17:48:31disruptekthen we can more forward on cps.
17:48:40disrupteks/more/move/
17:49:15ZevvLet me draw some goat blood and draw a five-pointed start on the bathroom floor
17:49:25FromDiscord<mu_studio> Does Nim have a string multiplication operator?
17:49:28disruptekwhatever it takes.
17:49:48FromDiscord<Rika> @mu_studio `strutils.repeat`
17:50:00FromDiscord<Rika> we do not have funky string times numbers kinda stuff
17:50:37disruptektemplate `*`(a: string; b: int): string = repeat(a, b)
17:50:51Zevvquick, move that in the stdlib before anyone notices
17:50:59FromDiscord<Rika> lmao
17:51:03Zevvjust as my `new Thing(key: val)`
17:51:54FromDiscord<NickSeagull> Is there a way to make the compiler add `{.effects.}` to all procs by default? Like a flag or something?
17:52:07disruptekno.
17:52:25shashlickis it possible to convert a seq into a tuple
17:52:33disruptekno.
17:52:40FromDiscord<mu_studio> > template `*`(a: string; b: int): string = repeat(a, b)↵@disruptek[IRC]#0000 this is strange why it wasn't added to the system.nim
17:52:50disruptekbecause it's dumb.
17:52:53FromDiscord<lqdev> because repeat is from strutils
17:53:00FromDiscord<Rika> because its dumb (2)
17:53:00FromDiscord<lqdev> and also it's unreadable and unintuitive for readers
17:53:10FromDiscord<lqdev> and also it's dumb (3)
17:53:21AraqI don't mind it but the symmetry means two overloads
17:53:33Araqplus I like the default of the space
17:53:52Araqso strutils.repeat seemed superior
17:54:05FromDiscord<Rika> default of the space?
17:54:26FromDiscord<queersorceress> @NickSeagull what are you looking to do?
17:54:26disruptekhe's thinking of spaces()
17:54:32Araq!eval repeat(4)
17:54:33NimBotCompile failed: /usercode/in.nim(1, 1) Error: undeclared identifier: 'repeat'
17:54:47Araq!import strutils; echo repeat(3)
17:54:52FromDiscord<Rika> didnt eval 😛
17:55:03Araq!eval import strutils; echo repeat(3)
17:55:06NimBotCompile failed: /usercode/in.nim(1, 29) Error: type mismatch: got <int literal(3)>
17:55:07FromDiscord<NickSeagull> @queersorceress essentially trying to make the compiler yell at me each time that I don't specify the exceptions that a proc can throw or the effects that it does
17:55:13Araqbah
17:55:18disruptekit's spaces, boss.
17:55:39FromDiscord<mu_studio> > because it's dumb.↵@disruptek[IRC]#0000 Python for example has such an operator and it doesn't seem like a dump at all
17:55:44FromDiscord<NickSeagull> (edit) 'does' => 'does. Without having to add `{.effects.}` each time'
17:55:49disruptekit's a dump indeed.
17:55:59Araqpretty sure it used to be repeat() before the community changed it
17:56:00FromDiscord<Rika> python has a completely different philosophy to nim afaik
17:56:14disrupteknickseagull: use .raises: []. for exception tracking.
17:56:38disruptekmu: i will license my template to you.
17:56:42disruptek$1 per invocation.
17:57:07FromDiscord<Rika> you can do it to only the entrypoint proc and itll complain for anything in that proc w/o a raises afaik?
17:57:13FromDiscord<queersorceress> i think part of the purpose of needing to specify the exceptions per proc is that all your procs shouldn't (ideally) be raising exceptions in the first place
17:57:40FromDiscord<NickSeagull> @queersorceress yep, but if they do by any chance, I'd like to be warned by the compiler ala Java
17:57:51FromDiscord<NickSeagull> Or Haskell's checked exceptions
17:57:52FromDiscord<Rika> try what i said
17:58:05FromDiscord<Rika> do it -> put raises: []
17:58:29Araqthere is also {.push raises: [].}
17:59:09FromDiscord<queersorceress> yeah, you should use a push for something like that, or possibly do some macro/template magic to apply the right tags to all the relevant procs
17:59:30FromDiscord<NickSeagull> Oh, thanks @Rika Araq and @queersorceress ^_^
17:59:31disrupteknah.
17:59:35FromDiscord<queersorceress> though, i think ideally you shouldn't have code that raises all that often
17:59:40FromDiscord<NickSeagull> Is there a way to do the same with effects?
18:01:04FromDiscord<Rika> @NickSeagull `tags` instead of `raises` i think
18:01:08*maier joined #nim
18:01:32FromDiscord<Rika> oh wait no
18:01:33FromDiscord<Rika> im not sure
18:01:34Araqin reality exceptions are pervasive and there is no going back to the days where perror(); exit(1) sufficed for software development
18:01:52Araqto protect against raises use 'try except'
18:01:52FromDiscord<NickSeagull> invalid pragma `push`, do I have to import something?
18:01:56disruptekpush will just make you angry.
18:02:17FromDiscord<Rika> you use `push` at the top of code so before the proc.decl.line
18:02:31FromDiscord<NickSeagull> I see
18:02:39disruptekrika makes me even more angry, though.
18:02:43disruptekit's a catch-22.
18:02:53FromDiscord<Rika> lol
18:02:58FromDiscord<NickSeagull> Oh cool @Rika 🙂
18:03:16Araq"checked" exceptions are a terrible idea. But Nim supports them well so go ahead and use what you think works best for you
18:03:33FromDiscord<Rika> araq why do you think theyre a bad idea?
18:04:13FromDiscord<NickSeagull> I probably won't use them, as I tend to encode everything in pure values, and then write an "interpreter" for them
18:04:20FromDiscord<NickSeagull> but just trying all the language features
18:05:26Araqcause they don't work, Rika. here is an API that takes a callback. can this callback raise? for maximum flexibility sure, it's a callback. and so the .raises effect bubbles up and creeps into everything
18:06:09Araqand no, making your callback return an Option[T] does *not* solve anything.
18:06:13*maier quit (Ping timeout: 264 seconds)
18:06:31FromDiscord<Rebel> is there a ternary operator for pragmas on a function? For example, if a certain compiler option is used then this proc has this pragma else it has no pragma. I know I can just use an if else statement checking compiler function and copy the proc twice only changing the pragma just wonder if there was a shortcut.
18:06:34FromDiscord<Rebel> (edit) 'function?' => 'proc?'
18:06:50*solitudesf quit (Read error: Connection reset by peer)
18:07:01disruptekrebel: use a custom pragma.
18:07:26FromDiscord<Rika> define a custom pragma and use a when else statement to choose which definition gets written
18:08:10FromDiscord<Rika> so like `when xxx:\n {.pragma: name, smth, smth.} \nelse:\n {.pragma: name, smth.}`
18:08:34FromDiscord<Rika> https://nim-lang.org/docs/manual.html#userminusdefined-pragmas-pragma-pragma
18:08:35disruptekthat's a terrible idea.
18:08:57Araqso, Tuesday night. Accomplished what I wanted for friday. Does that mean I have 3 days off?
18:09:06FromDiscord<Rika> well tell that to the writer of this manual
18:09:07disruptekpretty much, yeah.
18:09:18disruptekit means you can finish concepts.
18:09:30ZevvAraq: we have some compiler bugs to fix :)
18:09:36FromDiscord<Rebel> thanks Rika that is actually exactly what I need
18:09:58FromDiscord<Rebel> it's because if you use the dynlib pragma it adds a reloc section to the PE
18:10:08AraqZevv: pfff
18:10:23Araqlearn to un-semantize an AST
18:10:25disruptek!issue author:disruptek arc
18:10:26disbothttps://github.com/nim-lang/Nim/issues/15286 -- 3os.getFileInfo() causes ICE with --gc:arc on Windows 7& 5 more...
18:10:32disruptekit's a tiny one.
18:11:04disruptekand i promise it won't help cps.
18:11:29Araqhaven't you heard? Yardanico took over ARC's development
18:11:29*a_chou joined #nim
18:11:45disruptekhe has to do some string substitution for me first.
18:21:07*gmaggior joined #nim
18:22:18disruptekZevv: i guess he wants us to desym everything.
18:24:10ozoh a wild https://github.com/iocrate/netkit appeared in my Github newsletter :)
18:27:53FromDiscord<Rebel> maybe they'll add QUIC one day 👀
18:27:58disruptek!repo quic
18:27:59disbothttps://github.com/status-im/nim-quic -- 9nim-quic: 11QUIC for Nim 15 3⭐ 0🍴 7& 7 more...
18:28:47FromDiscord<Rebel> https://media.discordapp.net/attachments/371759389889003532/752958627689791519/rMQLfurdKwJKiJh-1600x900-noPad.png
18:28:48*narimiran joined #nim
18:29:36FromDiscord<Rebel> lol maybe in a few months https://media.discordapp.net/attachments/371759389889003532/752958831230844939/unknown.png
18:30:35*Jesin quit (Quit: Leaving)
18:31:54disruptekmonths?
18:32:06disruptekwhy would it take that long?
18:32:36*def- quit (Quit: -)
18:32:48*def- joined #nim
18:33:32*endragor quit (Remote host closed the connection)
18:34:01FromDiscord<Rebel> you are right I didn't realize this was a company's repo
18:34:17FromDiscord<Rebel> thought this was a solo dev
18:38:11disruptekgood point. i guess it might be a few months longer.
18:38:47FromDiscord<Rebel> just a safe guess no rush for what I am doing just cool to see people are on it already
18:39:18FromDiscord<Recruit_main707> isnt getProcAddress defined by nim?
18:39:32disruptekno.
18:40:23FromDiscord<Recruit_main707> only with the dynlib pragma then? https://media.discordapp.net/attachments/371759389889003532/752961544152678460/unknown.png
18:40:49disruptekwhy are you posting images to text chat?
18:41:13disruptekyou understand how hard is it for irc people to read that garbage?
18:41:20FromDiscord<Rika> lol
18:41:23disruptekevery one of us has to click on that fucking link.
18:41:26FromDiscord<Recruit_main707> it was a quote from the web↵`By default Nim's dynlib pragma causes the compiler to generate GetProcAddress `
18:41:29FromDiscord<Recruit_main707> there you go
18:41:32disruptekthanks.
18:41:39*endragor joined #nim
18:41:47disruptekthe docs are wrong, afaik.
18:42:05disrupteki'm like 95% sure getprocaddress is platform-specific impl imported by nim.
18:42:18disrupteksee for yourself.
18:42:28disruptekthen find a way to blame it on rika.
18:42:53FromDiscord<Rebel> if you look at the IAT of a PE with a dynlib pragma for windows api calls when you use importc and dynlib = ntdll.dll for example
18:42:59FromDiscord<Rebel> it's just using getprocaddress and loadlibraryA
18:43:05FromDiscord<Rebel> (edit) 'it's just using getprocaddress and loadlibraryA ... ' => 'it's just using getprocaddress and loadlibraryAunder the hood'
18:43:22FromDiscord<Rika> `then find a way to blame it on rika.` please do lol
18:43:36FromDiscord<Rebel> (edit) 'hood' => 'hood. LoadLibraryA -> GetProcAddress'
18:43:39FromDiscord<Recruit_main707> then it might have been on the past
18:44:46FromDiscord<Recruit_main707> this code uses it for example without wrapping it before:↵https://github.com/johnnovak/nim-raytracer/blob/master/src/gui.nim
18:46:33*endragor quit (Ping timeout: 260 seconds)
18:47:07FromDiscord<Rebel> I don't understand
18:47:09FromDiscord<Rebel> what are you trying to do
18:47:54FromDiscord<Rebel> the repo you linked doesn't use the dynlib pragma so not surprising getprocaddress isn't used?
18:48:06FromDiscord<Rebel> (edit) 'the repo you linked doesn't use the dynlib ... pragma' => 'the repo you linked doesn't use the dynlib& importc'
18:48:29FromDiscord<Recruit_main707> ` if not gladLoadGL(getProcAddress):`↵` quit "Error initialising OpenGL"`
18:48:58FromDiscord<Recruit_main707> line 87
18:49:02*Jesin joined #nim
18:49:08FromDiscord<Recruit_main707> this is what i want to do too
18:49:09FromDiscord<Rebel> you know you can link repos with the line number? lol
18:50:35FromDiscord<Rebel> https://github.com/nim-lang/Nim/search?q=getProcAddress&unscoped_q=getProcAddress
18:50:41*JustASlacker quit (Ping timeout: 256 seconds)
18:51:12FromDiscord<Recruit_main707> why does/did this code work/ed?
18:54:08FromDiscord<Rebel> I'm not a nim internals person but this is using nim's FFI capability and at least for windows just importing the function GetProcAddress from windows.h I can't speak on the unix side of things.
18:54:19disrupteksure you can.
18:55:01FromDiscord<Recruit_main707> but its still very weird, its not wrapped anywhere
18:55:14disruptekwhy should it be?
18:55:30FromDiscord<Recruit_main707> how does it use it if its not
18:55:38disruptekit's a miracle.
18:57:02Zevvdisruptek is so helpful today
18:57:07FromDiscord<Rebel> oh the author should've just imported it directly
18:57:14FromDiscord<Rebel> you can see how they use getprocaddress here
18:57:16FromDiscord<Rebel> https://github.com/johnnovak/nim-raytracer/blob/2b82953327211310981ec1b505e857f20822da6d/src/glad/gl.nim#L4171
18:57:19disrupteki can't help it.
18:57:25Zevvyes you can
18:57:28disruptekhaven't you heard of immaculate inception?
18:57:32FromDiscord<Rebel> they are loading glGetString which is a Windows API function
18:57:43FromDiscord<Rebel> and seeing if it can be loaded and if it can't for whatever reason return false
18:57:45Zevvjust sit on your hands before you incept
18:58:01disrupteki am writing the de-sym'er for cps.
18:58:05Zevvno dude
18:58:15disruptekit just has to ignore our pragmas.
18:58:17Zevvhow should that work?
18:58:43FromDiscord<Recruit_main707> and they are not passing a dll hinstance either
18:58:48disrupteksee?
18:58:50disruptekfucking miracle.
18:58:57*pietroppeter quit (Quit: Connection closed for inactivity)
18:59:17Zevvdisruptek: where do the syms go then, what do you put in place?
18:59:19Zevvand *why*?
18:59:39disruptekhmm, it just segfaults.
19:00:06disruptekdo you want to play with it?
19:00:50Zevvnah not today I'm afraid. I just need to drink beer, verbally abuse my friends and shoot them in the head repeatidly, virtually
19:01:00disruptekfair enough.
19:01:01Zevvi'm sick and tired of the day
19:01:03FromDiscord<Rebel> I would read more about the FFI @Recruit_main707
19:12:15FromDiscord<Elegant Beef> @dom96 the buttons use the game mechanic so steer into the left side.
19:19:30disruptekZevv: pushed.
19:21:40*endragor joined #nim
19:27:15*arecacea1 quit (Remote host closed the connection)
19:27:16*JustASlacker joined #nim
19:27:41*arecacea1 joined #nim
19:28:45*endragor quit (Ping timeout: 240 seconds)
19:35:21*maier joined #nim
19:37:26*superbia quit (Quit: WeeChat 2.9)
19:39:41*bwsq joined #nim
19:40:06*bwsq quit (Client Quit)
19:41:23*maier quit (Ping timeout: 260 seconds)
19:41:43*shirleyquirk joined #nim
19:49:24*a_chou quit (Ping timeout: 256 seconds)
20:04:04*sagax joined #nim
20:15:41*solitudesf joined #nim
20:17:01*narimiran quit (Ping timeout: 264 seconds)
20:18:07*canen joined #nim
20:18:12shashlickis @dom96 around?
20:18:50Zevvwait what you take the syms out and put idents in. how is that helping?
20:20:37*lritter quit (Ping timeout: 264 seconds)
20:21:18FromDiscord<Clyybber> what
20:21:36Zevv"learn how to desemantic your ast, knuckleheads"
20:21:54FromDiscord<Clyybber> thats ugh, stupid
20:22:03Zevvoh no he said "un-semantize"
20:22:11FromDiscord<Clyybber> why do I even do this proc arg semming
20:22:21FromDiscord<Clyybber> then, if you want to unsym it anyways?
20:22:24disruptekwe needed it.
20:22:32ZevvI don't know. unsymming sounds silly
20:22:33FromDiscord<Clyybber> and now you don't?
20:22:35disruptekno other way to match symbols before desymbolification.
20:22:38Zevvright
20:22:47FromDiscord<Clyybber> wtf do you want to desymbolize
20:22:51FromDiscord<Clyybber> and why
20:22:53Zevvwe don't *want*
20:22:56Zevvar4q tells us to
20:22:59disruptekdaddy said.
20:23:04FromDiscord<Clyybber> where
20:23:05Zevvin crypting messages
20:23:16Zevv20:10
20:23:19disruptekit was something i thought i'd try.
20:23:21disruptek!last araq
20:23:22disbotAraq spoke in 12#nim 2 hours ago 12https://irclogs.nim-lang.org/08-09-2020.html#18:01:52
20:23:50disrupteki can't tell if it helped because, y'know, the compiler segfaults.
20:24:42FromDiscord<Clyybber> that was probably a joke
20:24:53disruptekit was worth a shot.
20:24:56FromDiscord<Clyybber> bruh moment
20:25:03*a_chou joined #nim
20:25:06shashlickhttps://github.com/nim-lang/nimble/pull/846 - any feedback cc @dom96
20:25:07disbotFix #308, fix #515 - bin file name
20:25:18*lritter joined #nim
20:26:01*a_chou quit (Client Quit)
20:33:25*canen quit (Ping timeout: 240 seconds)
20:37:19*def- quit (Quit: -)
20:38:04*NimBot joined #nim
20:38:56*def- joined #nim
21:03:12*natrys quit (Quit: natrys)
21:16:05*JustASlacker quit (Quit: Leaving)
21:26:15*haxscramper quit (Remote host closed the connection)
21:37:16*maier joined #nim
21:38:21disruptekWHAT DO YOU MEAN `no type (or is ambiguous)` ?
21:38:27disruptekTHAT'S BULLSHIT, MAN!
21:42:43*maier quit (Ping timeout: 260 seconds)
21:44:30FromDiscord<Elegant Beef> Uh oh is disruptek making rookie errors?
21:45:18disruptekturns out the second year of nim is harder than the first.
21:45:35FromDiscord<Elegant Beef> Wait until 12 years a nim slave
21:46:48FromDiscord<dom96> damn, can't wait for year 12
21:46:50FromDiscord<dom96> almost there
21:47:33disruptekfuck that.
21:47:43disrupteki'll be coding rust by this time next year.
21:47:53FromDiscord<Rika> lol
21:47:57*a_b_m quit (Read error: Connection reset by peer)
21:48:05FromDiscord<Elegant Beef> Shit, cant spell disruptek without rust
21:48:18FromDiscord<Elegant Beef> dipek isnt as cool
21:48:40*disruptek is now known as diprustek
21:48:48FromDiscord<Rika> dinimptek xdddddddddddd
21:48:56FromDiscord<Rika> oops, left the t there
21:49:14FromDiscord<Elegant Beef> Dinimek sounds like a medical condition
21:49:33FromDiscord<Elegant Beef> also isnt that doms real name 😛
21:49:33FromDiscord<Rika> im sorry beef
21:49:36FromDiscord<Rika> you have dinimek
21:51:23FromDiscord<dom96> Once you start saying Dinimek, your chances of survival are 0%
21:51:46FromDiscord<Elegant Beef> You either live long enough to program in rust or say dinimek
21:53:38FromDiscord<Recruit_main707> Is krux still in this server?
21:54:51FromDiscord<Elegant Beef> I see them every so often
21:55:46FromDiscord<Rebel> is it possible to have a custom pragma with the .async. pragma and other pragmas for example: {.pragma: rtl, exportc, dynlib, stdcall., .async.} the async pragma does not seem to play well with other pragmas...
21:56:10diprustekno, not async.
21:56:46FromDiscord<Rebel> why
21:56:48FromDiscord<Rebel> that's really bad
21:56:55FromDiscord<Rebel> I might need to rewrite my whole app then lol
21:56:57diprustekask dom96.
21:58:09FromDiscord<dom96> ask Araq.
21:58:11FromDiscord<dom96> 😄
21:58:26FromDiscord<dom96> afaik this is a limitation of macros as pragmas in Nim
21:58:35FromDiscord<Rebel> it's not that you can't mix pragmas it's just that in the documentation unless I'm blind it doesn't say anything about that
21:58:40FromDiscord<Rebel> that would've been really nice to know
21:58:48FromDiscord<dom96> on the other hand though you probably shouldn't do this
21:58:52FromDiscord<Elegant Beef> lol we now have diprustek
21:59:03FromDiscord<Rebel> I do need to though
21:59:12FromDiscord<dom96> {.async, rtl.} ?
21:59:16diprustekyou need to get a fucking job.
21:59:21diprustekoh wait, that's me.
21:59:47diprustekyou know what the problem is with async?
22:00:27FromDiscord<Rebel> wait you just said you can't mix but that works? 🤔
22:00:48FromDiscord<Rebel> why does that work
22:01:01FromDiscord<dom96> You just can't define a new pragma that contains `{.async.}
22:01:03FromDiscord<dom96> (edit) '`{.async.}' => '`{.async.}`'
22:01:19FromDiscord<dom96> it needs to be directly on the proc
22:01:27FromDiscord<dom96> and to be honest, that is a good thing
22:01:42FromDiscord<dom96> it's important to be able to see which procs are async at a glance
22:01:47diprustektechnically, you can, but it can't be a template.
22:01:50diprustekafaik.
22:01:52FromDiscord<Rebel> ooooo ok that makes a lot of sense
22:01:54FromDiscord<Elegant Beef> Disruptek we both need to get jobs
22:02:05FromDiscord<Rika> whos disruptek?
22:02:11FromDiscord<Rebel> awesome
22:02:13FromDiscord<Elegant Beef> sorry diprustek
22:02:15FromDiscord<Rebel> thanks for the help
22:02:20FromDiscord<Elegant Beef> Thinking of someone else rika
22:02:39diprustekrebel: just write a macro to do it and give dom96 the finger while he's not looking.
22:02:48voidpiwait are there any nim jobs?
22:02:51diprustekno.
22:03:13FromDiscord<Elegant Beef> Only nim jobs involve being in a specific circle
22:03:24Prestigejust infiltrate a company and change their tech stack
22:03:34voidpinice
22:03:41FromDiscord<Elegant Beef> I mean im in rural canada, if these guys have a tech stack i'd be surprised
22:04:39Prestigemy job is heavy js, would be nice to use Nim. I've not done any Nim webdev, though
22:04:51FromDiscord<Elegant Beef> Eh just sneak nim generates js
22:05:02FromDiscord<Elegant Beef> Supposed to be using TS anyway
22:05:06FromDiscord<Elegant Beef> So it's not too different
22:05:11Prestigeikr
22:05:42PrestigeMaybe I'll invest energy in "fullstack" Nim soon
22:05:56FromDiscord<Elegant Beef> Fullstack nim is just nim, there is no difference
22:05:58FromDiscord<Elegant Beef> 😄
22:06:29Prestigeha well you know what I mean, get proficient at creating web apps with nim
22:06:38FromDiscord<Elegant Beef> Dont make webapps, use fidget 😛
22:06:50FromDiscord<Elegant Beef> Then you have a "webapp" and native app, without using electron
22:09:02Prestigeoh, will check this out tonight. Wonder if much will change: "WARNING: This library is still in heavy development"
22:22:16FromDiscord<Elegant Beef> Treeform is pretty receptive to good suggestions, like the `loadFontAbsolute` suggestion i made
22:22:43voidpiI just tried the minimal fidget example but it won't run since my video hw only supports opengl 3.1
22:22:49FromDiscord<Elegant Beef> lol
22:22:58FromDiscord<Elegant Beef> The hell are you using?
22:23:16voidpian old laptop
22:23:37voidpimodel name : Intel(R) Pentium(R) CPU P6100 @ 2.00GHz
22:26:04FromDiscord<Elegant Beef> Yea was going to say, even mac supports 4.1
22:27:43diprustek!repo bytes2human
22:27:44disbothttps://github.com/juancarlospaco/nim-bytes2human -- 9nim-bytes2human: 11Calculate all Byte units from integer bytes positive int64 with precision from Bytes to Yottabytes and return a human friendly string representation. 15 10⭐ 1🍴
22:33:20*Vladar quit (Quit: Leaving)
22:36:16FromDiscord<Avatarfighter> wait a darn minute, disruptek unmuted discord?
22:36:55FromDiscord<Avatarfighter> wait a minute who is this diprustek fellow and what have they done with disruptek!
22:36:59*solitudesf quit (Ping timeout: 240 seconds)
22:37:02FromDiscord<Rika> again who the hell is disruptek
22:37:35FromDiscord<Avatarfighter> @Rika only the best nim programmer around shame they disappeared
22:37:52diprustekthat guy was a prick.
22:38:29diprustekhe did have an ass that just wouldn't quit, though.
22:38:40FromDiscord<Hearthstone (LGBTQ+)> He's still here though, isn't he @Avatarfighter?
22:38:57FromDiscord<Avatarfighter> he is here in our hearts
22:38:57FromDiscord<Hearthstone (LGBTQ+)> @disruptek
22:39:04FromDiscord<Hearthstone (LGBTQ+)> Wrong user
22:39:12FromDiscord<Hearthstone (LGBTQ+)> @disruptek
22:39:17FromDiscord<Hearthstone (LGBTQ+)> He should be on irc-
22:39:54FromDiscord<Elegant Beef> Lol you guys arent quick witted, diprustek is he
22:40:07FromDiscord<Avatarfighter> is who
22:40:33FromDiscord<Rika> i dont even remember anyone called disruptek
22:40:51diprusteknot much of a coder, but he sure could sing.
22:41:16FromDiscord<Avatarfighter> im so glad that the Nim compiler is made with magic, imagine if code was used 🤣
22:41:48diprustekperish the thought.
22:42:04FromDiscord<Avatarfighter> nay
22:43:34ForumUpdaterBotNew thread by Geekrelief: Difference between configuration via .cfg, .nims, and nimble?, see https://forum.nim-lang.org/t/6787
22:54:56FromDiscord<tomck> Hello - how can i 'unexport' something from a module?↵↵I have some C code which I am including, which redefines 'bool' - how can I not export this definition? Or do i need to edit the included file itself
23:01:09FromDiscord<dom96> instead of including it why don't you import?
23:01:39diprustekwhy would you redefine bool?
23:01:43diprustekmadlad
23:06:29FromDiscord<Hearthstone (LGBTQ+)> Oh-
23:08:49FromDiscord<tomck> errr i need to include for some reason
23:08:57FromDiscord<tomck> i got around it with cSkipSymbols
23:10:55*Trustable quit (Remote host closed the connection)
23:21:12*lritter quit (Quit: Leaving)
23:22:24FromDiscord<tomck> sent a code paste, see https://play.nim-lang.org/#ix=2wTq
23:23:22FromDiscord<tomck> is `foo` being inferred as a closure here, even though I just use it as if it were a static function?
23:23:44*arecacea1 quit (Read error: Connection reset by peer)
23:24:08*arecacea1 joined #nim
23:35:35*krux02_ joined #nim
23:38:09*maier joined #nim
23:38:40*gmaggior quit (Quit: Leaving)
23:39:07*krux02 quit (Ping timeout: 256 seconds)
23:43:05*maier quit (Ping timeout: 256 seconds)
23:46:56FromDiscord<Rika> Compiler bug
23:47:09FromDiscord<Rika> Anything with internal error is usually a compiler bug
23:47:15FromDiscord<Yardanico> Would it even make sense to add inline pragma to an iterator?
23:48:11FromDiscord<Rika> Don’t iterators have to be declared as closure to be a closure iterator
23:53:49FromDiscord<iWonderAboutTuatara> Pretty sure iterators in proc are inline by default, yeah
23:53:53FromDiscord<iWonderAboutTuatara> Don't quote me on that
23:53:54FromDiscord<tomck> all i know is that it works
23:53:54FromDiscord<tomck> & that it probably should be able to work without an actual closure + fn ptr
23:54:05FromDiscord<iWonderAboutTuatara> Araq: is the best persont o ask about this I think
23:54:30FromDiscord<iWonderAboutTuatara> I don't know if you need the : to ping someone from irc, just put it there incase
23:54:46*Tuatarian joined #nim
23:55:01FromDiscord<iWonderAboutTuatara> Tuatarian
23:55:12*Tuatarian quit (Client Quit)
23:55:27FromDiscord<iWonderAboutTuatara> Can confirm you don't need the semicolon
23:55:49FromDiscord<Elegant Beef> I havent even used IRC and i know how the pinging works 😄
23:55:52*krux02_ quit (Remote host closed the connection)