<< 28-05-2020 >>

00:05:48*konvertex quit (Ping timeout: 272 seconds)
00:13:11leorizewdym?
00:14:22*zacharycarter joined #nim
00:18:29bunglike handle query next 10 items
00:19:40bunghttps://redis.io/commands/scan like redis server handle scan
00:22:05*krux02_ quit (Remote host closed the connection)
00:25:59*FromDiscord quit (Remote host closed the connection)
00:26:13*FromDiscord joined #nim
00:27:16*Guest94415 quit (Ping timeout: 256 seconds)
00:27:41FromDiscord<Zed> i just realised how lazy i am with development
00:28:32FromDiscord<Zed> im using bloody make files so i dont have to type nimble build
00:28:46*GitterIntegratio quit (Ping timeout: 246 seconds)
00:30:18skrylar[m]nothing wrong with makefiles
00:30:48*dadada joined #nim
00:31:10*dadada is now known as Guest77939
00:32:29zacharycarterI'm looking at some C++ code which is assigning a value of 0xFF to a unsigned char ptr
00:33:12zacharycarterwell to an unsigned char array I should say
00:35:09zacharycarterif I run `echo char(0xFF)` in Nim I don't think I get the same octal escape sequence that I do in C
00:35:21zacharycarter`\377`
00:35:26zacharycarterso all of this is confusing me
00:44:51*Tlongir joined #nim
00:51:57*endragor joined #nim
00:52:50*lritter quit (Ping timeout: 256 seconds)
00:53:08*lritter joined #nim
00:55:02*Guest77939 quit (Ping timeout: 265 seconds)
00:57:34*Senny quit (Ping timeout: 258 seconds)
01:00:46*dadada joined #nim
01:01:13*dadada is now known as Guest88345
01:06:44FromDiscord<codic> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/715370437399281715
01:12:05FromDiscord<flywind> You should import `strformat` modules
01:12:07FromDiscord<Elegant Beef> You dont have strformat
01:12:08FromDiscord<Elegant Beef> Yea
01:12:42FromDiscord<codic> Oh
01:12:43FromDiscord<codic> I'm stupid
01:12:46*monokrom quit (Remote host closed the connection)
01:12:54FromDiscord<codic> I confused strformat and strutils
01:12:57FromDiscord<codic> 🤦
01:18:18FromDiscord<codic> How do I change active dir? in nim
01:18:33FromDiscord<Elegant Beef> setCurrentDir
01:18:37FromDiscord<Elegant Beef> in the OS module iirc
01:18:39FromDiscord<codic> o, thanks
01:19:23FromDiscord<codic> is there a way to get the aboslute path to a file?
01:19:49FromDiscord<codic> nvm dont need to
01:20:11*chemist69 quit (Ping timeout: 272 seconds)
01:20:39bungAbsoluteFilehttps://nim-lang.org/docs/os.html#absolutePath%2Cstring
01:21:10FromDiscord<codic> thanks might be useful late
01:21:12FromDiscord<codic> (edit) 'late' => 'later'
01:21:56*chemist69 joined #nim
01:22:58*endragor quit (Remote host closed the connection)
01:23:45*endragor joined #nim
01:24:08FromDiscord<codic> how come when i use a name with dashes, like soldeb-nim, i get invalid module name?
01:24:58*Guest88345 quit (Ping timeout: 272 seconds)
01:27:50FromDiscord<codic> *soldeb-cli
01:27:56FromDiscord<codic> the file name is soldeb-cli.nim
01:27:58bungyou cant import by literal
01:28:10disrupteksure you can.
01:28:15FromDiscord<codic> what do you mean?
01:28:22disruptekimport "goat-fucker.nim"
01:28:57FromDiscord<codic> i'm not importing the file
01:29:02FromDiscord<codic> not making it a mdoule at all
01:29:07disruptekof course not.
01:29:10FromDiscord<codic> No idea why the file name is affecting the compiltation
01:29:13FromDiscord<codic> *compilation
01:29:14disrupteksoldeb-cli is not a valid symbol.
01:29:26disrupteknim no longer supports kebab style.
01:29:49FromDiscord<codic> frick
01:29:58FromDiscord<codic> I'll use soldebCli
01:30:09disruptekyou can use an underscore.
01:30:45*dadada__ joined #nim
01:34:25FromDiscord<codic> nah.
01:34:28*dddddd quit (Ping timeout: 272 seconds)
01:34:30FromDiscord<codic> i prefer camel case
01:35:12disruptekaight boss.
01:35:43FromDiscord<codic> :p↵I was trying to create and cd to a temporary directory:↵``
01:35:49FromDiscord<codic> sent a code paste, see http://ix.io/2nxX
01:35:55FromDiscord<codic> for some reason it gives me Error: unhandled exception: Not a directory
01:36:07FromDiscord<codic> even tho tempDir is a string and that directory is created
01:38:54FromDiscord<Elegant Beef> nim has procs to make folders
01:39:20FromDiscord<Elegant Beef> Just make a directory then dispose of it when done
01:40:18FromDiscord<Elegant Beef> tempDir needs to include the file name
01:40:22FromDiscord<Elegant Beef> when copying
01:43:21*nphg joined #nim
01:43:31FromDiscord<Elegant Beef> Atleast i assume so considering the doccumentation saying it replaces it if a file is there
01:44:55*nphg1 quit (Ping timeout: 260 seconds)
01:48:11*fredrikhr quit (Ping timeout: 260 seconds)
01:54:20*dadada__ quit (Ping timeout: 246 seconds)
02:00:49*dadada joined #nim
02:01:13*dadada is now known as Guest13239
02:18:15*endragor quit (Remote host closed the connection)
02:22:06*endragor joined #nim
02:24:26*Guest13239 quit (Ping timeout: 246 seconds)
02:26:16*cgfuh quit (Ping timeout: 256 seconds)
02:27:50skrylar[m]disruptek: kebabs are nice though :(
02:28:04*skrylar[m] has annoyances that this-thing.nim doesn't work
02:29:13*muffindrake quit (Ping timeout: 272 seconds)
02:29:47FromDiscord<Technisha Circuit> Is it possible to import a directory without a .nimble file?
02:30:51*dadada__ joined #nim
02:31:07*muffindrake joined #nim
02:32:16leorizeyes
02:32:19leorize-p:
02:32:29FromDiscord<codic> > nim has procs to make folders
02:32:34skrylar[m]nim c -p:../something thingdo
02:32:36FromDiscord<codic> I want a randomly created one like mktemp
02:32:42skrylar[m]preferably put the -p's in nim.cfg
02:32:57leorizeskrylar[m]: well we can make it work, but it's not a high priority
02:34:23FromDiscord<codic> > tempDir needs to include the file name↵> when copying↵ah
02:34:34FromDiscord<codic> lemme try
02:34:43leorizecodic: https://nim-lang.org/docs/posix_utils.html#mkdtemp%2Cstring
02:35:15FromDiscord<codic> oh.
02:35:24FromDiscord<codic> thanks
02:39:49*gangstacat quit (Quit: Ĝis!)
02:46:58FromDiscord<codic> it's actually finally fricking working
02:48:32*gangstacat joined #nim
02:53:55*chemist69 quit (Ping timeout: 272 seconds)
02:54:16*dadada__ quit (Ping timeout: 246 seconds)
02:54:24*chemist69 joined #nim
02:59:43skrylar[m]\o/
03:00:55*dadada joined #nim
03:01:18*dadada is now known as Guest88684
03:17:31*Tongir joined #nim
03:19:44*Tlongir quit (Ping timeout: 246 seconds)
03:20:20skrylar[m]suppose should grind away a bit more on the engine later
03:21:27skrylar[m]do have a minor curiosity about revisitng the old bmessage concept; which is basically just a hash map jammed in to a buffer, but the lasti mpl of that was messy
03:22:36*justsomeguy joined #nim
03:23:43skrylar[m]sadly event pump code is not glamorous
03:23:47skrylar[m]nor are canvasses :/
03:24:46*Guest88684 quit (Ping timeout: 258 seconds)
03:27:15*waleee-cl quit (Quit: Connection closed for inactivity)
03:30:48*dadada__ joined #nim
03:37:25*justsomeguy quit ()
03:49:38*rockcavera quit (Remote host closed the connection)
03:54:50*dadada__ quit (Ping timeout: 265 seconds)
04:00:49*dadada joined #nim
04:01:14*dadada is now known as Guest9108
04:06:01*supakeen quit (Quit: WeeChat 1.9.1)
04:06:37*supakeen joined #nim
04:07:32*Brandon__ joined #nim
04:10:47*bebarker quit (Ping timeout: 265 seconds)
04:16:12*mwbrown quit (Ping timeout: 256 seconds)
04:18:50*mwbrown joined #nim
04:24:29*Guest9108 quit (Ping timeout: 246 seconds)
04:29:33*lritter quit (Quit: Leaving)
04:30:51*dadada__ joined #nim
04:54:28*dadada__ quit (Ping timeout: 258 seconds)
05:00:56*dadada joined #nim
05:01:19*dadada is now known as Guest44678
05:15:04*Tongir is now known as Maxwell_Pound
05:33:16martiniumanyone know why a running program would go to sleep while writing?
05:33:32martiniumafter writing a boatload my nim program just pauses
05:33:51martiniumgnome resources window for process gives status as sleeping
05:39:48livcdcan you share your code?
05:47:34martiniumlivcd, https://gist.github.com/martinium/e11f0fd1299675e5c7a0d729f3d342dc
05:48:28martiniumjust added a poll of 5000
05:48:32martiniumgot this error
05:48:34martiniumError: unhandled exception: Connection timed out [OSError]
05:54:38martiniumtook a few weeks break for this error
05:54:46martiniumcame back and still kicking my butt
05:54:49martinium:-p
05:55:12martiniumfew weeks off looking at the code I meant*
05:57:33martiniumif I comment out client.close() in req proc I get this error after a little while
05:57:35martiniumError: unhandled exception: No handles or timers registered in dispatcher. [ValueError]
06:06:09*solitudesf joined #nim
06:07:23*leorize quit (Ping timeout: 240 seconds)
06:08:15*leorize joined #nim
06:19:00*zedeus quit (Quit: zedeus)
06:21:48FromDiscord<Zed> can you discard a variable? would this work? ↵`let temp: int = 10`↵ `discard temp`↵`let temp: string = "worked?"`
06:22:54PrestigeYou can always try at https://play.nim-lang.org/ btw
06:23:21PrestigeBut no, you cannot redefine it
06:23:25FromDiscord<Zed> i always forget about that, bookmarked it now
06:23:40Prestigediscard is basically to acknowledge that you are not doing something with a proc's return value
06:24:01FromDiscord<Zed> will nim be getting an official repl anytime soon?
06:24:18PrestigeI think I heard of a project that was working on it but I can't recall rn
06:25:18FromDiscord<Zed> is there any way you can redefine a variable?
06:25:41PrestigeNot to change it's type, but to change value declare it as `var x = something`
06:25:48Prestigeits*
06:26:25PrestigeDo you have an example of something you're wanting to do though? Maybe I can offer a solution
06:27:06PrestigeAlso this is what I meant, if I wasn't clear: https://play.nim-lang.org/#ix=2nyr
06:28:25*tdc joined #nim
06:28:55FromDiscord<Zed> im just thinking ahead in time with temp variables,
06:29:35PrestigeCan't really say without looking at the code, but maybe consider generics?
06:30:14FromDiscord<Zed> good idea
06:30:30FromDiscord<Zed> That would actually work really well
06:45:08FromGitter<sheerluck> https://i.imgur.com/sfRmYVX.png
06:45:48Prestigelmao the dino sweater
06:49:59skrylar[m]its really like that though ._.
06:50:24skrylar[m]i just noticed the other day vscode doesn't even have jump to bookmark
06:50:42skrylar[m]usually ctrl-f2 and f2 are bound to putting and jumping between those
06:58:23FromDiscord<Zed> How do generics work in nim? ↵Looking in the manual at the generics i see a parameter with a generic type just has a `T` but when trying it myself it im getting an undeclared identifier?↵https://play.nim-lang.org/#ix=2nyr
06:58:44FromDiscord<Zed> *https://play.nim-lang.org/#ix=2nyr
06:59:05FromDiscord<Zed> my playgrounds messed up
06:59:37FromDiscord<Zed> https://play.nim-lang.org/#ix=2nyv
06:59:49FromDiscord<Zed> That's the right one
07:01:09bunggeneric type is like cpp's
07:01:16Yardanico@Zed that's not how you create a generic
07:01:20Yardanicoand no, generics don't exist at runtime
07:01:24Yardanicoa variable can only have _one_ type
07:02:11FromDiscord<Elegant Beef> The closest you can get to what you're attempting is an object variant afaik
07:02:18Yardanicohttps://nim-lang.org/docs/manual.html#generics
07:02:21bungproc name[GENERICT](a:GENERICT)
07:02:29bungthat's how it works
07:02:41Yardanicoyeah check the link in the manual
07:05:18*ftsf_ joined #nim
07:06:38FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2nyw
07:06:42FromDiscord<Elegant Beef> Something like that
07:06:52FromDiscord<Elegant Beef> You'd ideally make constructors for each variant type
07:06:59FromDiscord<Elegant Beef> To reduce having to specify the kinds
07:07:14*ftsf quit (Ping timeout: 260 seconds)
07:07:50FromDiscord<Zed> ok, ill have to play around with it then
07:08:11bungwhen document it or decalre it you will see T,P,E... when use it you pass the actually type to it
07:08:42FromDiscord<Elegant Beef> Generics basically just state that you accept specific types, or all types
07:08:52FromDiscord<Elegant Beef> sequences for instance
07:09:33FromDiscord<Elegant Beef> Nim is statically typed so we can do the silly python stuff here
07:09:39FromDiscord<Elegant Beef> (edit) 'can' => 'cany'
07:09:40*CcxWrk quit (Ping timeout: 256 seconds)
07:09:42FromDiscord<Elegant Beef> (edit) 'cany' => 'cant'
07:09:47FromDiscord<Elegant Beef> Rip IRC
07:09:52Yardanicowhy?
07:10:00FromDiscord<Elegant Beef> I edited it twice
07:10:01Yardanicoso?
07:10:10Yardanicowe have ircord for more than a week now
07:10:29FromDiscord<Elegant Beef> I mean rip as in i just spammed it with me modifing the message
07:11:54*PMunch joined #nim
07:11:59FromDiscord<Elegant Beef> yard you might be a little self conscious of your bot 😛
07:13:25Yardaniconah
07:13:39FromGitter<sheerluck> Bot can set up a 20 sec timer before sending message. So when 'can' => 'cany' timers just resets. And after 'cany' => 'cant' too. And finally, when for 20 sec nothing changes, bot sends msg
07:14:13Yardanicothat's really a long amount
07:14:18Yardanicoit won't be a "real time chat" then
07:14:53FromDiscord<Rika> Anything longer that 1 is too long, and no one edits in a second
07:15:03Yardanicoexcept me in telegram
07:17:28*idf joined #nim
07:17:39FromGitter<sheerluck> It will be really real time chat for almost all of us, except for those with fragile ego.
07:17:56Yardanicowe don't know if a user will send edits or not
07:17:58Yardanicothat's the thing
07:18:02skrylar[m]real time memes
07:19:50Yardanico930 members in the discord server and less than 25 of them active on a regular basis :D
07:23:19skrylar[m]discord is awful imho
07:23:31Yardanicowell yeah disallowing third-party clients in ToS kinda sucks
07:23:44skrylar[m]was talking to someone earlier about how one of the biggest lies discord has is that you are member of a server
07:24:28*oprypin quit (Quit: Bye)
07:24:37skrylar[m]really what happens is people immediately turn off notifications, bury the server somewhere in their list, and probably never join the voice chat. so you have a big list of names, mostly meaningless, and people aren't integrated to a community at all. and since the servers are free* everyone and their dog has one, which further diasporas the hell out of everyone
07:25:02skrylar[m]contrast to teamspeak/mumble where you get one, and you occupy a slot being there, so if someone is around they are here to be around with other people
07:26:10voltistAnybody know how I could convert an arraymancer tensor of type int16 to uint8?
07:27:47skrylar[m]Yardanico: those have been banned in every tos for every chat network, they just don't tend to bother to enforce it
07:27:58ZevvPMunch: ping
07:27:59Yardanicoskrylar[m]: that's not true
07:28:06*Trustable joined #nim
07:28:07PMunchZevv, pong
07:28:12Yardanicodoes telegram ban third party clients? not at all
07:28:25ZevvPMunch: I got my cooked example ready for you, check https://github.com/zevv/nimcoro/blob/master/main.nim
07:28:46Zevvlightweight coroutine based async I/O from scratch
07:28:52PrestigeSup PMunch
07:29:03PMunchPrestige, just workin'
07:29:34PMunchZevv, "jiield" :P
07:31:50Zevvyeah, tell me about it
07:32:01ZevvI started with `yeild` but that made my eyes bleed
07:32:28PMunchHahaha, yeah that would just be even more confusing
07:32:29PrestigeI need to recruit you to work on nimdow with me PMunch lol :P If only I could afford you
07:32:47*oprypin joined #nim
07:33:06Zevvanyway, hope that this answers your questions, fwiw :)
07:34:37skrylar[m]Yardanico: icq somehow still exists. pidgin still supports it
07:34:54skrylar[m]there is also a discord plug for pidgin
07:35:00PMunchZevv, I think so. So essentially those jield would only do async stuff when in an async context? So when you run newCoro it creates this context if it doesn't exist?
07:35:39Zevvright. In non-coro context this yield does not make sense and will throw on you
07:35:59Zevvbut the nice thing is that coroutines are not "special" otherwise. No magic, no pragmas, no iterators, no macros
07:36:23PMunchPrestige, haha I'd love to be able to work in Nim again full-time (although I mostly work in Nim already).
07:36:38Zevvit's just a common proc. You can pass the resumer around to anywhere and yield away.
07:37:08ZevvI first was sad that I could not make yield/resume pass data like the Lua coros because of typing, but in the end that's no problem, since most of that can be done with closures or shared data anyway
07:37:29PMunchOh yeah, what is the resumer?
07:37:46PrestigePMunch: I'm curious if I should just read the xlib manual to figure out what's going on with this one particular case I'm running into. Been tempted to clone another window manager to figure out what the deal is
07:38:09PMunchWhich case?
07:38:15PrestigeAlthough a bug bounty might not be a bad option
07:38:29Prestigethere is a wine application that should be floating but I'm not detecting it as such
07:38:29PMunchLooking at another window manager might be a massive pain..
07:38:36PMunchHmm
07:38:38ZevvPMunch: the resumer is a tiny proc that has the coro as a closure and does co.resume()
07:38:46PMunchPrestige, a specific one?
07:39:01Zevvso you don't need to know the `co` itself, as it is nicely tucked away in the closure
07:39:03PMunchOr just any Wine application?
07:39:04PrestigeI've only tried one, LoL (the game)
07:39:27Prestigenone of my cases to detect if something should be floating has caught it
07:39:30FromDiscord<Elegant Beef> Prestiege do you know that when a window wants to be mapped if the min size == max size it wants to be floating?
07:39:41Prestigeand since I don't know what I'm looking for, it's been difficult
07:39:52Prestigeoh that's interesting Beef
07:40:23FromDiscord<Elegant Beef> It worked for a ton of windows like battle.net and winetray
07:40:31FromDiscord<Elegant Beef> and vscode save dialogs
07:40:53PrestigeYou always brighten my day, I will look into that
07:41:03FromDiscord<Elegant Beef> You must be a gloomy individual 😄
07:41:35PMunchZevv, hmm
07:42:23PrestigeBeef: I've been trying to figure this out for like 2 days so any news is good news haha.
07:42:57PMunchZevv, I think I need to implement my idea and see if it works out
07:43:11PMunchIt would have a lot of the same benefits as your solution here
07:43:26PMunch@Elegant Beef, you're also writing a WM?
07:43:30FromDiscord<Elegant Beef> I was
07:43:36FromDiscord<Elegant Beef> I've given up since i despise xlib
07:44:18PMunchHaha, yeah it's not great..
07:44:22FromDiscord<Elegant Beef> https://streamable.com/jcli03 gave up around here
07:44:26PMunchMaybe xcb would be better?
07:44:37FromDiscord<Elegant Beef> Nah still dealing with atoms
07:44:41PrestigeI wish I had started with xcb
07:44:45FromDiscord<Elegant Beef> Those atoms are fucking atrocious
07:45:32PMunchWhat?
07:45:36PMunchI kinda like atoms :P
07:45:43ZevvPMunch: what would your idea look like?
07:45:43FromDiscord<Elegant Beef> I dislike them so much
07:46:14PrestigeOh nice vid Beef, that looks good
07:47:29FromDiscord<Elegant Beef> It's functional, but some nuisances
07:48:13PrestigeI haven't ran into any bugs with nimdow except these windows not floating
07:48:58FromDiscord<Elegant Beef> I dislike xlib a lot cause im not one for reading documentation, im one for aimlessly guessing 😄
07:49:37PMunchZevv, well the async procedures would return a Future, this Future holds the return type and a closure iterator. The closure iterator yields other closure iterators. When you get a Future you can "waitFor" it which would set up a one-time dispatcher and run through until it got a return value. Or you could "await" it which would require an async context and add it to that queue.
07:49:41PMunchOr something like that
07:49:52FromDiscord<Elegant Beef> also why `jield`?
07:50:05FromDiscord<Elegant Beef> Wouldnt `delay` or `wait` be acceptable?
07:51:14FromGitter<sheerluck> Anti-Python stance
07:51:26FromDiscord<Elegant Beef> huh?
07:53:21FromGitter<sheerluck> yield made his eyes bleed
07:53:36ZevvPMunch, hmm
07:53:46Prestige@Elegant Beef You were correct! that fixed the issue I've been bug hunting for like 20 hours :) Thanks!
07:53:47PMunchsheerluck, yeild made his eyes bleed :P
07:53:49PMunchNot yield
07:53:56FromDiscord<Elegant Beef> Cheers
07:54:23PMunchPrestige, @Elegant Beef, I'll just quickly make a note of that for when I run into this issue myself :P
07:54:29Zevv`yield` is a keyword, so I can't use that
07:54:50FromDiscord<Elegant Beef> is `delay` or `wait` not viable?
07:54:58FromGitter<sheerluck> my english is so bad. `yeild` and `yield` are same for me :(
07:55:02PrestigeI'm stupid happy right now
07:55:09*Guest44678 quit (Ping timeout: 256 seconds)
07:55:13FromDiscord<Elegant Beef> Well you were stupid sad before eh?
07:55:16FromDiscord<Elegant Beef> 😛
07:55:20PMunchI agree though that "delay", "wait", "relinquish" or something else would probably be better
07:55:24PrestigeBeef since I couldn't figure it out, I was planning on reading the entire xlib manual tomorrow lol.
07:55:45PMunchsheerluck, took me a couple times reading that sentence until I noticed it myself :P
07:55:51FromDiscord<Elegant Beef> Hey maybe if we fused like DBZ characters we'd turn into one competent xlib programmer
07:56:00Prestigelmao
07:56:10PMunch@Elegant Beef, do you have a reference for this, or is it just something you figured out by accident?
07:56:26FromDiscord<Elegant Beef> Think there is a stackoverflow or something somewhere that explained that
07:57:31ZevvElegant Beef: sure, but it's just called 'yield' normally. Plus, I'd like to stay close to the Lua interface, because I think the Lua guys can think pretty well and generally make good interfaces.
07:57:34PrestigeWe should really start documenting these weird cases we find
07:57:45FromDiscord<Elegant Beef> We should
07:58:09FromDiscord<Elegant Beef> Or we should not give any aid and just say "Go use wayland"
07:58:10FromDiscord<Elegant Beef> 😄
07:58:48PrestigeLol
07:59:42PMunchHmm, I can't find anything on minsize == maxsize: floating
08:00:50*Vladar joined #nim
08:00:55*dadada joined #nim
08:01:18*dadada is now known as Guest25737
08:01:20FromDiscord<Elegant Beef> Yea idk
08:02:02Prestigeworked for me, lol
08:03:16PMunchI should get back to working on PiMo
08:03:33PMunchTried a couple of weeks ago but ended up doing NimScript instead :P
08:03:37FromDiscord<Elegant Beef> Nah you should get to the the article!
08:03:52PMunchThat actually came about from my work on PiMo
08:04:00FromDiscord<Elegant Beef> Ah
08:04:13FromDiscord<Elegant Beef> You wanted to do the same as i did with nimscript for configuration?
08:04:15PMunchTo do configuration and keyboard events and such
08:04:21PMunchYup
08:04:24PrestigeThat would be so cool
08:04:34FromDiscord<Elegant Beef> I wanted to use nimscript to code imgui widgets for my status bar
08:04:36PMunchWait, you were also using NimScript for configuration?
08:04:40FromDiscord<Elegant Beef> No
08:04:42FromDiscord<Elegant Beef> I wanted to
08:04:45PMunchAh
08:06:03FromDiscord<Elegant Beef> But I also did move to regolith, and like the experience here so
08:06:13PMunchregolith?
08:06:22FromDiscord<Elegant Beef> Presetup i3-gaps on a ubuntu distro
08:06:36FromDiscord<Elegant Beef> Uses rofication
08:06:43FromDiscord<Elegant Beef> And has nice themes
08:07:12PMunchHuh, interesting
08:07:33FromDiscord<Elegant Beef> One of the nice parts-↵`Command 'snap' not found, but can be installed with:`
08:07:40PMunchThat's actually one of the reasons I switched from Ubuntu to Manjaro back in the day. It was one of the few distros that had an i3 flavour
08:07:51PMunchrofication?
08:08:03FromDiscord<Elegant Beef> A notification system that uses rofi to draw
08:08:15FromDiscord<Elegant Beef> https://github.com/DaveDavenport/Rofication
08:08:26FromDiscord<Elegant Beef> It's non intrusive
08:08:40FromDiscord<Elegant Beef> Displays a bell on the system tray, and you open notifications to read them all
08:10:47PMunchHmm, that is interesting
08:14:30FromDiscord<Elegant Beef> Yea i was using ubuntu with a manually setup i3 but regolith ships with pretty sane defaults, and a easily customized settings
08:14:48FromDiscord<Elegant Beef> (edit) removed 'a'
08:15:05FromDiscord<jasonfi> I posted an article regarding Nim on hacker news that's generating some conversation: https://news.ycombinator.com/item?id=23333955#23334482
08:15:17*Vladar quit (Remote host closed the connection)
08:15:23FromDiscord<jasonfi> not sure if anyone wants to chime in regarding some of the questions/opinions
08:15:31FromDiscord<Elegant Beef> 3 is wrong
08:15:39*Vladar joined #nim
08:15:48FromDiscord<Elegant Beef> Strong type is != static type
08:16:58FromDiscord<Elegant Beef> Should work
08:16:59FromDiscord<Elegant Beef> sent a code paste, see http://ix.io/2nyP
08:20:42PMunchI mean Nim is both strong and static
08:20:46FromDiscord<Elegant Beef> Yea
08:20:52FromDiscord<Elegant Beef> But strong is not the same as static
08:20:59FromDiscord<Elegant Beef> Static is what they meant to imply
08:21:12FromDiscord<Elegant Beef> (edit) 'imply' => 'say'
08:21:35FromDiscord<Elegant Beef> Atleast in this sentence it seems like static is what they're describing↵> Nim has a strong type system, unlike Python where types can only be specified optionally. A typed language gives better information to the compiler for better optimizations.
08:21:37FromDiscord<Rika> wish we had better error messages 😛
08:21:41PMunch4.3, I don't think the error messages are that bad any longer
08:21:49FromDiscord<Elegant Beef> Yea i was going to say
08:21:52FromDiscord<Rika> i still think they are
08:21:53PMunchBut that might just be because I got used to how bad they used to be :P
08:21:55FromDiscord<Elegant Beef> They're pretty on the point most times
08:22:02FromDiscord<Rika> not all of them are
08:22:24PMunchI mostly find weird error messages when I'm doing weird stuff with meta-programming
08:22:25FromDiscord<Elegant Beef> I'd say a disadvantage is the tooling is subpar at times
08:22:29PMunchAnd that's only fair :P
08:22:31FromDiscord<Elegant Beef> Same
08:22:49FromDiscord<Elegant Beef> Nim suggest occasionally doesnt want to behave properly
08:22:52FromDiscord<Elegant Beef> Which is always nice
08:23:26FromDiscord<Elegant Beef> Look at the errors of vscode has 0, meanwhile nim suggest is saying `fmt cannot be instantiate here`
08:23:41FromDiscord<Elegant Beef> Compiles and runs, starring at the red line, and questioning life
08:24:52*Guest25737 quit (Ping timeout: 272 seconds)
08:25:16*clemens3 quit (Read error: Connection reset by peer)
08:29:39PMunchYeah.. That one is strange..
08:30:30PMunchI've found that it's sometimes because nimsuggest (or in my case nimlsp) was pointed at the wrong version of the stdlib, or was compiled with a different version of Nim (because I've choosenim-ed to a different version which doesn't switch nimlsp).
08:30:54*dadada__ joined #nim
08:31:40FromDiscord<Elegant Beef> Well it works but then occasionally stops working
08:32:50bungI thought nimlsp might have master child processes
08:33:17bungmake it not easyly break down.
08:34:45bungin vscode crash multiple times in minutes will not restart it again
08:35:16FromGitter<sheerluck> Sorry for offtopic, I am too afraid to ask in Zig chat. I have LLVM built with 4 LLVM_TARGETS out of 18. My question is why Zig makes me build all TARGETS, I don't want to rebuild llvm with all TARGETS enabled. My hypothesis is Zig wants me to stay with Nim. How sweet of him.
08:35:49PMunchbung, this was a deliberate design decision
08:37:45bungafter I fix the path issue, the error mostly related to nimsuggest that point to nim vm that I cant fix .
08:37:50PMunchThe LSP clients should supervise the process already, and has a closer link to the user. NimLSP could supervise nimsuggest, but then no-one would fix the bugs that makes nimsuggest crash, because no-one would notice them. And what if the supervisor failed? Should we have a supervisor supervisor?
08:38:44FromDiscord<Elegant Beef> Get a supervisor supervisor
08:39:11bungthat might need a compile flag
08:39:17PMunchBut then who supervises that?
08:39:21FromDiscord<Elegant Beef> Each supervisor has to exponentially reduce the chance of a fatal crash
08:39:29PMunchIt's supervisors all the way down!
08:39:53bungevery one can see the error , see it crashs
08:40:16bungonly few people can fix it
08:41:40bungand it also not easy for user properly reporting such a problem, not easy reproduce...
08:44:54PMunchhttps://github.com/PMunch/nimlsp/issues/50
08:44:55disbotAdd better support for NimScript files
08:45:35PMunchbung, still it's better that the issues are detected at all than hidden from anyone by a supervisor that might end up not doing the right thing anyways.
08:49:08bungok, got your point, may need times make it more stable.
08:49:51*gangstacat quit (Ping timeout: 272 seconds)
08:50:32*gangstacat joined #nim
08:56:52*neceve joined #nim
08:56:57PMunchPrestige, Steam is a hot mess under i3 by the way
08:57:10PrestigeOh really? Hmm
08:57:15PrestigeMaybe I'll try out steam...
08:58:56Prestigehm it has some issues I'll have to look into..
09:01:04Prestigewow PMunch it's actually a mess lol. How strange
09:01:20PMunchYup
09:01:23PMunchSuper annoying
09:01:35bungwhat's find index of element in seq , havn't see it list in doc
09:01:59PMunchFor example right now I'm moving a folder between two libraries, and that window insists on showing up on every workspace..
09:02:34PrestigeI think it's just mySeq.find(element)
09:02:57PrestigePMunch: if I maximize steam, sometimes it just starts doing its own thing
09:03:06Prestigelike it won't full screen or be part of my layout
09:03:42PMunchYeah..
09:03:50PMunchI've ended up having to xkill steam more than once..
09:04:51Prestigemaybe it's upset that I make it smaller than its min size
09:06:40*jwm224 quit (Ping timeout: 272 seconds)
09:08:03PMunchAh, now I got this fun bug again..
09:08:09PMunchIt shows a window I can't click anything in
09:08:31bungoh , devel doc has a linked list find
09:08:34*jwm224 joined #nim
09:08:35PrestigeA particular steam window? I want to test it out if you can recreate it
09:10:45PMunchIt seemed to happen when I moved a game from one library to another, then moved the "Moving game" window while it was moving. When it finished I couldn't interact with the window any longer
09:38:13PMunchHmm: /home/peter/.nimble/pkgs/compiler-1.3.5/compiler/vmops.nim(109, 5) Error: not all cases are covered; missing: {backend}
09:40:42*konvertex joined #nim
09:42:20PMunchIs there a way to download a particular version of the compiler API with nimble?
09:46:40bungyou want store the api data?
09:46:41FromDiscord<dom96> nimble install [email protected]
09:59:09PMunchAh it was @ and not #
09:59:11PMunchMakes sense
09:59:21PMunchBut there is no way to get devel?
09:59:55PMunch@dom96 ^
10:01:39Yardanico@#head ?
10:01:47Yardaniconimble install compiler@#head
10:01:53Yardanicothat's how it works for nimble generally :)
10:02:27PMunchRight..
10:02:36PMunchWould be nice if this was in the --help message..
10:02:40*MortS joined #nim
10:10:17FromDiscord<dom96> PRs welcome 😛
10:13:17Yardanicohttps://quuxplusone.github.io/blog/2020/05/28/oo-antipattern/
10:14:25Yardanico#3 on HN lol
10:19:15*fredrikhr joined #nim
10:19:17PMunchHaha, that's like almost all code in Nim :P
10:19:31PMunch@dom96, I should've seen that coming..
10:39:43*letto quit (Quit: Konversation terminated!)
10:41:13*CcxCZ quit (Quit: WeeChat 2.4)
10:41:40*letto joined #nim
11:00:35FromGitter<sheerluck> is it possible to switch https://play.nim-lang.org/#ix=xxxx to `--gc:arc` or `--gc:none` mode with some pragma inside? Like `--passC=` but for nim?
11:00:58Yardanicono
11:01:12Yardanicoplayground doesn't support things like that yet
11:01:29FromGitter<sheerluck> well I will use https://wandbox.org then
11:01:33Yardanicookay
11:02:22PMunchPRs welcome :)
11:04:45FromGitter<sheerluck> So this is what I found out. If you take this working https://wandbox.org/permlink/K9juRfres8B4JXJB and add `--gc:arc` to "Compiler options" it will say that `nimErr_ undeclared` and `label BeforeRet_ used but not defined`
11:07:51Yardanico@sheerluck that code looks a bit wrong anyway
11:07:55Yardanicowhy use {.global.} at top level?
11:08:00Yardanicobut yeah report an issue
11:09:19PMunchhttps://github.com/PMunch/nimlsp/issues/51 <- could anyone test this in another editor?
11:09:19disbotFailure when asked to give definition in file that wasn't explicitly opened
11:10:10YardanicoPMunch: I didn't really understand the issue, what exactly do I need to try?
11:10:17Yardanicogo to definition if the target definition is not in an opened file?
11:10:31PMunchNo
11:10:42PMunchFollow a definition into a file that you haven't opened yet
11:10:52PMunchThen see in the logs if this triggers a didOpen event
11:10:54Yardanicoisn't that what I said? :P
11:11:05Yardanicooh, idk if vscode-nim-lsp does that logging, hm
11:11:08PMunchErr, yes
11:11:28PMunchI was actually meaning to say "then do another lookup of a definition in that file"
11:11:40PMunchBecause that is what actually triggers the exception and doesn't work
11:12:06PMunchBut what I'm really interested in is if other editors will create a didOpen event for this scenario
11:12:55*dadada__ quit (Ping timeout: 256 seconds)
11:13:20*MortS left #nim (#nim)
11:14:05*MortS joined #nim
11:14:26*dadada joined #nim
11:14:50*dadada is now known as Guest53197
11:19:58*CcxWrk joined #nim
11:28:41*fredrikhr quit (Ping timeout: 246 seconds)
11:30:21*MortS quit (Quit: leaving)
11:30:38*monokrom joined #nim
11:36:10FromGitter<sheerluck> my first issue #14480
11:36:12disbothttps://github.com/nim-lang/Nim/issues/14480 -- 3--gc:arc generate invalid code for {.global.} («nimErr_» in NIM_UNLIKELY) ; snippet at 12https://play.nim-lang.org/#ix=2nzs
11:37:16FromGitter<sheerluck> I feel like I accomplished something today
11:40:44Araq:-)
11:40:49*MortS joined #nim
11:40:57FromDiscord<mratsim> welcome to the club
11:41:14Yardanico@sheerluck you might have 10 issues in a month then :P
11:42:22Yardanico@sheerluck seems to might've been related to https://github.com/nim-lang/Nim/issues/14240
11:42:24disbot[exceptions:goto] C compiler error with dynlib pragma calling a proc ; snippet at 12https://play.nim-lang.org/#ix=2nzx
11:43:43Yardanicoat least the C compiler error is exactly the same (minus the file diffs)
11:44:28*fredrikhr joined #nim
11:44:42*NimBot joined #nim
11:58:21*nphg quit (Quit: Leaving.)
12:03:06*onionhammer quit (Read error: No route to host)
12:04:18ZevvOne of these questions again I actually feel ashamed about, but I never properly used inheritance in Nim: http://ix.io/2nzE
12:04:38ZevvMy fruit loses its appleness when I put it in a box, and I get an ObjectAssignmentDefect.
12:06:01*supakeen quit (Quit: WeeChat 1.9.1)
12:06:40*supakeen joined #nim
12:06:50*theelous3 joined #nim
12:08:55alehander92hmm
12:11:22PMunchMake your objects ref objects: https://play.nim-lang.org/#ix=2nzG
12:12:34PMunchThe Box only has room for a Fruit object, and Fruit objects only have type information while Apple objects are bigger with an additional color. When using a ref object the Box only stores a reference which can point to all kinds of sizes, including Apples.
12:12:39PMunchZevv ^
12:13:10Zevvah dang, that's not the first time that happened to me :/
12:13:24alehander92you should eat more vegetables
12:13:31alehander92i don't do it nearly enough tho
12:13:40ZevvYeah, I would explain it exactly so if some else asked me I guess :)
12:14:22alehander92sorry! but still applicable
12:14:22Zevvcan we arase the above 10 lines from all the IRC logs?
12:14:22alehander92:D
12:14:24*letto quit (Quit: Konversation terminated!)
12:14:36PMunchHaha :P
12:15:26alehander92the fruit accident
12:16:09*sacredfrog quit (Quit: ZNC 1.8.0 - https://znc.in)
12:16:15*letto joined #nim
12:16:35*rockcavera joined #nim
12:16:42ZevvJust like the enigmatic "spaghetti incident" that gets referenced in the Calvin and Hobbes a few times
12:16:57ZevvAs a kid I went through *all* the albums again and again, looking for the incident
12:16:59Zevvbut it was never there
12:17:46alehander92is it a cold war
12:17:47alehander92reference
12:17:56alehander92or cold spaghetti reference
12:18:40Zevvargh, and in the end my code was ok all along, I stareted out with ref objects of course, but my problem was in a completely idfferent place
12:20:12Zevvso, my closures are gone now in the async poc. Now only to do the CPS in Nim and it's done
12:22:27AraqI already love your POC ;-)
12:23:10ZevvI don't like this now: https://github.com/zevv/nimcoro/blob/master/main.nim#L55
12:23:21PMunchAraq, since the finaliser refers to the type and not the object, why doesn't it just look for a `proc finalizer(x: ref T)`? https://nim-lang.org/docs/system.html#new%2Cref.T%2Cproc%28ref.T%29
12:23:27ZevvI need to explicitly convert back to MyTask
12:24:17PMunchZevv, why doesn't that just take a MyTask?
12:24:26PMunchIt will only work for MyTask anyways..
12:24:51ZevvI can't pass it to newCoro then, that wants a `proc(task: TaskBase)`
12:25:22ZevvI'm not strong on this inheritance thing it seems :)
12:25:59PMunchHuh, that's odd. Shouldn't MyTask match a TaskBase?
12:26:13*FromDiscord quit (Remote host closed the connection)
12:26:26*FromDiscord joined #nim
12:26:28Zevvyeah, but does that mean `proc(t: MyTask)` matches `proc(t: TaskBase)`?
12:26:31Zevvthat's oranges and apples
12:26:36*nphg joined #nim
12:29:50PMunchWell it's apples and fruts..
12:29:53PMunchfruits*
12:30:15PMunchIs an apple a fruit? Would someone asking for a fruit accept an apple?
12:30:27PMunchMaybe you need to use methods..
12:30:39ZevvI will *never* touch methods again
12:30:50PMunchHaha :P
12:30:53*Kaivo quit (Quit: updating kernel)
12:30:55PMunchBad memories?
12:31:12ZevvBut true, apple matches fruit, but Box-of-apples does not match Box-of-fruit
12:31:56ZevvI trying to force this down the compilers throat somehow, but it just doesn't want to swallow.
12:32:50*Kaivo joined #nim
12:33:20*haxscramper joined #nim
12:33:34FromDiscord<mratsim> use concepts :p
12:33:57FromDiscord<mratsim> but I guess it's generics rearing their ugly heads again
12:34:28FromDiscord<mratsim> I agree with Zevv though, I'm never using methods again
12:34:48Zevvwell, this was araqs idea anyway :)
12:35:09FromDiscord<mratsim> I went all the way to implement macros to emulate inheritance with object avariants: https://github.com/mratsim/trace-of-radiance/blob/master/trace_of_radiance/support/emulate_classes_with_ADTs.nim
12:35:20Zevvwow
12:35:49ZevvI thought you did that for performance reasons
12:36:01FromDiscord<mratsim> otherwise I just store the data in the object, and then have my proc load whatever is needed from the object fields
12:36:01haxscramperI have `proc`, define like this: `proc t[T](arg: Option[(T, int)]) = discard` and it gives me compilation error (even without instantiation): `Mixing types and values in tuples is not allowed`. If I remove `Option` everything works correctly (declaration and instantiation). What's wrong with the first proc?
12:37:39FromDiscord<mratsim> Multiple reasons:↵- No shared ref object because it's a pain to multithread↵- no heap allocation because cache misses are much more expensive than a case/switch↵- no heap allocation because it avoids memory fragmentation when the objects are stored in a sequence, and memory fragmentation is a much bigger issue than having all object variant be the same sidze as the max object size
12:38:25Zevvthat says nothing about Nim methods being flakey :)
12:38:55FromDiscord<mratsim> well, they are but I don't need to prove that :p
12:39:22FromDiscord<mratsim> at least they are flaky with generics
12:39:23PMunchhaxscramper, try proc t[T](arg: Option[tuple[field1: T, field2: int]])
12:40:04Zevvmratsim: right. So I'm not going to try to solve my current issue with generics. I'll just leave the explicit conversion in :)
12:41:22FromDiscord<mratsim> in any case, I think you should be very careful with ref objects with a task system
12:41:41haxscramperPMunch: thanks it is working now. Is there any known reason why it fails did't work with regular tuple?
12:42:07FromDiscord<mratsim> when switching task, the GC will scan the stack, which is empty since there is no references there, and may collect your old stack even though it shouldn't
12:42:15alehander92methods are ok if you dont do generics with them i guess
12:42:19PMunchDid the playground just die?
12:42:30PMunchOh wait, seems to have come back now
12:43:23PMunchhaxscramper, not sure really.. I rarely if ever use anonymous tuples, so I haven't run into this before.
12:44:27FromDiscord<mratsim> also what language is that? https://github.com/zevv/nimcoro/blob/master/coro.nim#L89
12:46:24Zevvits dutch for yield()
12:47:15Zevvsomeone put yield in the list of reserved keyword. dont ask me why
12:47:25Zevvso now I am forced to jield instead
12:47:39PMunchI'm still voting for relinquish
12:47:45PMunchWay harder to type though :P
12:48:08PMunchsubmit?
12:48:38PMunchconcede?
12:48:44Zevvzzzz()
12:49:26PMunchThen have different semantics based on if you're using zzz zzzz or zzzzz
12:49:34*nphg_ joined #nim
12:49:44AraqZevv, 'yield' is used inside iterators
12:50:20stefantalpalaruAchtung! "/usr/lib/libcrypto.dylib" is unusable on macOS Catalina: https://github.com/status-im/nim-status-client/pull/209
12:50:21disbotsqlcipher
12:52:01ZevvAraq: yeah, but I'm not inside an iterator :)
12:52:30*nphg quit (Ping timeout: 256 seconds)
12:53:26FromDiscord<dom96> stefantalpalaru: does it affect the stdlib ssl support?
12:53:43FromDiscord<dom96> i.e. can you dynamically link?
12:54:58stefantalpalaruI don't have a Catalina image at my disposal, only other people's bug reports. Anyway, it would seem dlopen() also fails.
12:57:15stefantalpalaruMac users ended up manually copying and symlinking files around, but that's obviously going to be borked by the next OS update.
12:58:10FromDiscord<dom96> why would they break dlopen'ing openssl though?
13:00:34stefantalpalaruThese guys also use dlopen() and they search the lib dir for versioned lib names to load: https://github.com/saltstack/salt/pull/56958/files#diff-102dd477fd06a685974d94e2f1bf80cbR59
13:00:35disbotProperly handle libcrypto library search on macOS.
13:00:50*waleee-cl joined #nim
13:01:18FromDiscord<dom96> pretty sure Nim always depends on various versions of DLLs anyway
13:03:25FromGitter<kaushalmodi> Araq: Looking forward to https://github.com/nim-lang/Nim/pull/14439 getting merged.. my weekly crons testing my public repos using nim devel have started failing due to a nim doc regression. That PR fixes that (too).
13:03:26disbotfix #8871 runnableExamples now preserves source code comments, litterals, and all formatting; other bug fix
13:03:57stefantalpalaruYou're right, dom96: https://github.com/nim-lang/Nim/blob/c817e85f4cddeddf534ea2890f7f741388ed1ff8/lib/wrappers/openssl.nim#L67
13:04:10*zedeus joined #nim
13:04:26planetis[m]is this a sizeof bug: https://play.nim-lang.org/#ix=2nzO ?
13:04:58planetis[m]padding would make it 8 bytes
13:05:51FromDiscord<mratsim> uint16 only need to be 2 bytes aligned
13:06:01FromDiscord<mratsim> so 6 bytes total is normal
13:06:18FromDiscord<mratsim> and that's what the playground is returning for me
13:06:29planetis[m]ok thanks
13:22:45Araqkaushalmodi: how can we get Timothee to work on the important things?
13:23:35Araqpushing docgen bugs around isn't all that productive
13:23:38FromGitter<timotheecour> trust me, i really don’t want to do any nim doc related stuff
13:23:48Araqoh hi :D
13:23:59FromGitter<timotheecour> i just wanna get this out of the way
13:25:13FromGitter<timotheecour> and hi :)
13:25:46FromGitter<kaushalmodi> Araq: docs are important!
13:26:10Araqyes, they are, but you don't have to rely on all the edge cases
13:26:14FromGitter<kaushalmodi> With the recent --project fixes, I can finally publish the docs for the SystemVerilog associated Nim library at work
13:27:07Araqnice :-)
13:27:27alehander92timothee thanks for the unthankful work :P
13:27:28FromDiscord<mratsim> docs are a pain :/
13:27:56FromDiscord<mratsim> everytime i want to do docs, I spent 10 min trying to format tables in RST
13:28:14Araq.. raw::
13:28:20Araq <table> ... </table>
13:28:23Araqsimple.
13:28:29FromDiscord<mratsim> then try to cook up a script to multi nimble files documentation
13:28:39Araquse any HTML based tool to produce them
13:28:42FromDiscord<mratsim> .nim*
13:28:48FromGitter<kaushalmodi> mratsim: tables in Org mode are seamless.. now pandoc exports Org tables to rst tables perfectly
13:29:07FromDiscord<mratsim> Nim compiler doesn't support grid tables
13:29:16FromGitter<kaushalmodi> ah, yes, that :)
13:29:39FromGitter<kaushalmodi> mratsim: ⏎ ⏎ > then try to cook up a script to multi nimble files documentation ⏎ ⏎ --project on nim devel is immensely better [https://gitter.im/nim-lang/Nim?at=5ecfbcc32c49c45f5aa9f7c1]
13:29:41Araqgrid tables are painful to write if you lack the editor support
13:30:13FromDiscord<mratsim> I use markdown and any markdown -> rst converter produces grid tables
13:30:32FromDiscord<mratsim> requiring people to write html tables is the same
13:33:43*zacharycarter quit (Ping timeout: 246 seconds)
13:33:48*nphg_ quit (Ping timeout: 256 seconds)
13:34:51*zacharycarter joined #nim
13:37:36*nphg_ joined #nim
13:38:31FromGitter<timotheecour> one way to generate table is via a nim macro that does the grunge work of converting to html, eg: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ecfbed74412600ccd731a6e]
13:38:47*opal quit (Remote host closed the connection)
13:40:01*opal joined #nim
13:42:31*rockcavera quit (Remote host closed the connection)
13:47:47*opal quit (Remote host closed the connection)
13:55:49*opal joined #nim
14:00:50Araqtimotheecour: sorry, I don't want to be ungrateful. but I'm concerned about "let's use the macro system to build the docgen"
14:08:23*nphg_ quit (Ping timeout: 258 seconds)
14:10:20*nphg_ joined #nim
14:11:54FromDiscord<Recruit_main707> https://golang.org/pkg/builtin/#copy↵which one out of the various copy functions of nim matches this one?
14:13:19FromDiscord<Recruit_main707> i feel like its deepCopy, but im not sure
14:15:07FromGitter<timotheecour> that `myTable ` macro can be used independently from docgen-as-a-library, the idea here is to generate tables using nim macros (ie, more flexibility than what rst offers since it allows nim syntax + arbitrary code to build tables); what happens once you have the html is TBD; it could be fed as doc comment althouhg that’s a bit roundabout; ideally rst can consume it directly (magic is 1 option, there’s probably
14:15:07FromGitter... another way)
14:17:43*aeverr quit (Quit: Konversation terminated!)
14:18:27FromDiscord<mratsim> or we can separate the docgen in a separate tool
14:18:53FromDiscord<mratsim> and add markdown
14:19:29*endragor quit (Remote host closed the connection)
14:21:14Araq"You can display a pipe (|) character in a table by using its HTML character code (&#124;)."
14:22:50FromDiscord<dom96> @mratsim yes please
14:23:29FromDiscord<mratsim> yes to which?
14:24:27Araqto markdown and a new docgen
14:25:12FromDiscord<dom96> docgen as a separate tool
14:25:20FromDiscord<dom96> we've got jsondoc already, no?
14:25:54Araqyup. it doesn't help, but yup
14:26:09FromGitter<timotheecour> that’s 1 venue but i don’t think it works; but it would be an improvement so that you’d have `nim => json => separate tool => html`
14:27:52*nphg_ quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com ))
14:28:50FromGitter<timotheecour> that’d mean that someone can completely change the frontend (eg serve docs using a karax SPA) without having to change any of the logic that generates the exported symbols (represented as json)
14:29:03Araqthe problem is the 'json' itself.
14:30:21Araqit either loses information or is de-facto json+(html inside), or json+(markdown/rst inside)
14:30:23FromGitter<timotheecour> or protobuf if you want a spec; at that point it doesn’t matter too much; if spec evolves, so can the tool
14:30:53Araqsome semi-structured format is involved
14:31:38Araqand HTML is one such format, so you might as well run a post-processor over today's HTML output
14:32:14FromGitter<timotheecour> if you all you have are runnableExamples and RST, then parsing RST and running runnableExamples (from raw code as string) would be taken care of by the tool
14:32:44FromGitter<timotheecour> nim wouldn’t need to know anything about RST
14:33:40Araqtrue but the RST remains inside the JSON and the tool needs an RST parser. (same for markdown)
14:34:09Araqnot to mention the problem of cross-links
14:34:23FromGitter<timotheecour> it would just feed un-processed doc comments and runnableExamples to the tool; no embedded html; ⏎ Yes, the tool does need an RST parsers, that’s a better separation of concern than nim compiler having to knwo abou RST
14:34:25Araqin fact, the JSON better contains links too then
14:34:40FromDiscord<dom96> I don't see the problem
14:34:46FromDiscord<dom96> the JSON should simply contain the raw comments
14:34:56FromGitter<timotheecour> that’s what I’m saying
14:34:56FromDiscord<dom96> it's up to the tool to decide what to do with it
14:37:16Araqas I said, the JSON better contains links too then so that I can click on a type name.
14:37:34FromDiscord<dom96> does the current docgen support that? 😛
14:37:39Araqyes, it does.
14:37:54FromDiscord<dom96> what, how? Can you link an example?
14:38:51Araqhttps://nim-lang.org/docs/asyncdispatch.html#%3D%3D%2CAsyncFD%2CAsyncFD click on AsyncFD
14:39:18FromDiscord<dom96> oh, right
14:39:21FromDiscord<dom96> That's not part of the comments
14:39:31FromDiscord<dom96> The JSON doesn't need links for this
14:39:37FromDiscord<dom96> but can easily include them
14:39:43Araqhow so?
14:39:54FromDiscord<dom96> just generate a serialised version of the NimNode
14:40:06FromDiscord<dom96> and have a field called `url` on proc param nodes
14:40:13Araqlol
14:41:28Araqthat would work but then the JSON becomes a rather complex tree. Why not just use the HTML tree instead? at least the HTML tree has a spec...
14:42:06FromGitter<timotheecour> easier to parse html for tooling; html should only ever be used for rendering, never for information exchange
14:42:26FromGitter<timotheecour> `asier to parse html for tooling;` => `asier to parse json for tooling;` (of course; typo)
14:42:43Araqso what, we have a HTML parser
14:42:58FromDiscord<dom96> HTML for information? That's XML
14:43:05FromDiscord<dom96> *shrug*
14:43:09Araqbut I don't care, PRs are welcome
14:43:12FromDiscord<dom96> Just create a Nim data structure
14:43:14FromDiscord<dom96> and serialise it
14:43:22FromDiscord<dom96> Nim programs can read that fine 😛
14:43:35Araqall I am aiming for is that you understand the problem well
14:44:09FromGitter<kaushalmodi> > easier to parse html for tooling; ⏎ ⏎ I was like, huh! ⏎ ⏎ And then saw your edit :) [https://gitter.im/nim-lang/Nim?at=5ecfce3889941d051a2b2c2c]
14:44:15disruptekrunnableExamples are pretty hard to use as tests, turns out. which sucks.
14:44:27FromGitter<timotheecour> how so
14:44:33FromGitter<kaushalmodi> disruptek: how so
14:44:49disruptekwhen the fail, it's hard to see /which/ failed.
14:44:55disrupteks/the/they/g
14:45:24FromGitter<kaushalmodi> may be something changed? now I see the path to the runnable example in /tmp
14:45:34disruptekgreat, what good does that do you?
14:45:35FromGitter<timotheecour> that’s a small PR away to spit out file/line/col where it came from (which btw is already included in runnableExamples genereated soruce code)
14:45:42disruptekexactly.
14:45:52disrupteknow i know how you'll be spending your saturday.
14:46:41FromGitter<kaushalmodi> disruptek: ⏎ ⏎ > great, what good does that do you? ⏎ ⏎ Well, I just run that example, see the error and fix it [https://gitter.im/nim-lang/Nim?at=5ecfced0225dc25f54aff466]
14:47:25disruptekrunnableExamples are pretty hard to use as tests, turns out. which sucks.
14:49:43disruptekcriterion doesn't work at all in nim-1.0. only 1.2+.
14:50:31disruptekscratch that; it only works with pragmas with args, in 1.0.
14:54:07Zevvoi Araq: how can I avoid this: https://github.com/zevv/nimcoro/blob/master/main.nim#L57: I need to make my coros take a TaskBase and convert to my own type because newCoro() does not want to take a proc(T) where T is a derivative of TaskBase.
14:54:28Zevvmoi'n disruptek
14:54:37disruptektry a converter.
14:54:43disruptekand howdy.
14:54:45FromGitter<timotheecour> disrputek if there’s no bug tracking whatever problem you’re describing, the bug might as well not exist ;-)
14:54:57disrupteksure.
14:55:10disrupteklet's pretend stuff is easy to use because we don't have a ticket saying otherwise.
14:55:18disruptekgtfo
14:56:28*gxt__ is now known as gxt
14:56:32martiniumanyone ever get this error with async code? SIGSEGV: Illegal storage access. (Attempt to read from nil?)
14:57:39dom96That error can happen for millions of reasons
14:57:50dom96we need to see a stack trace to help
14:58:04martiniumonly just happened now with trying to getOrDefault() from a map
14:58:14Zevvmartinium: show your code, put up a pastebin
15:00:31martiniumhttps://gist.github.com/martinium/e11f0fd1299675e5c7a0d729f3d342dc
15:00:48martiniumline 88
15:00:57martiniumassetOs.getOrDefault
15:01:07martiniumthat has caused that error
15:01:09martiniumworks without it
15:01:16FromDiscord<mratsim> you use newTable (aka TableRef)
15:01:26FromDiscord<Technisha Circuit> How would i use a string as a variable name in Nim?
15:01:29FromDiscord<mratsim> do you always initialize them?
15:02:08martiniumproc getAssetPage initializes them
15:02:10FromDiscord<Technisha Circuit> So for example i have a string like `"myName"`, how would i turn it into a variable name that i can assign data to
15:02:23FromDiscord<mratsim> @Technisha Circuit it needs to be static and you need to use a macro, or you just use the identifier (not as string) and use the identifier construction from the manual: https://nim-lang.org/docs/manual.html#templates-identifier-construction
15:02:38*Vladar quit (Quit: Leaving)
15:09:39FromDiscord<Recruit_main707> Federico3 i think i have finished my flatbuffers implementation
15:09:51FromDiscord<Recruit_main707> just in case you want to have a look at it
15:13:44federico3url? :)
15:14:13*MortS quit (Quit: leaving)
15:14:28FromDiscord<Recruit_main707> ill need a few seconds to post it to github, (im really bad at it :P )
15:15:07*MortS joined #nim
15:15:35*muffindrake quit (Quit: muffindrake)
15:16:28*muffindrake joined #nim
15:21:16FromDiscord<Recruit_main707> https://github.com/Albus70007/NimFlatbuffers/tree/master
15:22:37*MortS quit (Quit: leaving)
15:22:48FromDiscord<mratsim> flat buffers are that simple?
15:23:07*MortS joined #nim
15:23:28FromDiscord<Recruit_main707> i felt like the rest of the files of the other frameworks were really not necessary
15:23:42zacharycarterhave you ever used flatbuffers? they're quite complex and a pretty big PITA
15:24:04FromDiscord<Recruit_main707> lobster for instance has only one file
15:24:28FromDiscord<mratsim> Because Skrylar also has a flatbufffers implementation with les than ~300lines, and I was lke, mmmh no way it's so easy: https://github.com/Skrylar/skflatbuffers/blob/master/skflatbuffer.nim
15:24:44*MortS quit (Client Quit)
15:25:05*MortS joined #nim
15:25:31FromDiscord<Recruit_main707> generics make sources smaller also,
15:25:51FromDiscord<mratsim> shhhh, there are Go developers there, don't talk too much about how nice generics are
15:26:41FromDiscord<Recruit_main707> (*they must face it and start using nim over go*)
15:26:59FromDiscord<Technisha Circuit> Am i able to turn json objects into types?
15:27:07FromDiscord<Recruit_main707> actually yes
15:27:11FromDiscord<Technisha Circuit> Because I can turn types to json objects
15:27:18FromDiscord<Technisha Circuit> Oh?
15:27:30FromDiscord<Recruit_main707> [JsonNode].to([type])
15:28:27*MortS quit (Client Quit)
15:30:11*MortS joined #nim
15:40:22disruptekyou're blowing my mind right now.
15:43:23federico3Recruit_main707: make sure you *never* call quit() inside a library
15:43:59FromDiscord<Recruit_main707> they do it in both python and go, thats why i did, i can ask them why though
15:45:19federico3that's their fault; don't follow poor design choices
15:48:43codic:P
15:49:23FromDiscord<Recruit_main707> ok, ok if thats the only thing you can see that should be changed i guess thats good :)
15:53:33zacharycarterwhat would `unsigned char**` be in Nim? `ptr UncheckedArray[ptr char]` ?
15:54:05zedeus`UncheckerArray[char]` is char*, so just no need for ptr char
15:54:21*rockcavera joined #nim
15:54:28zacharycarterso just `ptr UncheckedArray[char]`?
15:55:19FromDiscord<Generic> unsigned char != char
15:55:21*njoseph quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
15:55:31zacharycarterwell according to the Nim docs it is
15:55:39zacharycartercuchar = char
15:55:44FromDiscord<Generic> oh you're right
15:55:48zedeusI think it depends on the usage, ** doesn't specify if it's a pointer to a list or a 2d list
15:55:48FromDiscord<Generic> that's confusing
15:56:07zacharycarterzedeus hmm yeah
15:56:16FromDiscord<Generic> my bad, it depends on what you're trying to archive
15:56:31zacharycarterI'm guessing it's the latter since this is intended to hold pixel data
15:56:43FromDiscord<Generic> a pointer can point to a single object
15:56:53FromDiscord<Generic> or to the first object of a list
15:57:17zedeuspossibly, but 1d arrays are more efficient so it could still be a pointer to a list
15:57:22FromDiscord<Generic> the first one would be ptr UncheckedArray[ptr char], while the latter would be ptr UncheckedArray[ptr UncheckedArray[char]]
15:57:58FromDiscord<Generic> zedeus is right, for pixel data, better use a single list with the size of width*height
15:58:23FromDiscord<Generic> and index it with [(x + y * width) * colorchannels]
15:58:40zacharycarterhmm okay thanks
16:01:04zedeusUncheckedArray[T] is translated to `T data[]` in C, so `ptr UncheckedArray[ptr char]` would be `T **data[]` which I believe is equivalent to `T ***data`
16:01:52zedeusor in english, a pointer to an array of pointers
16:02:35solitudesfUncheckedArray does not imply pointer
16:03:48zedeusthere's no actual difference between arrays and pointers in C, so `data[]` == `*data`
16:03:50solitudesf!eval var a = "abc"; let b = cast[ptr UncheckedArray[char]](addr a[0]); echo b[1]
16:03:52NimBotb
16:09:57*solitudesf quit (Quit: Leaving)
16:14:30*ftsf_ quit (Ping timeout: 258 seconds)
16:14:30*njoseph joined #nim
16:16:10zedeushmm yeah, the C code produced for that is (NIM_CHAR*), I didn't expect that
16:16:20zedeusthe manual just says it's an array, which implies pointer
16:17:51FromDiscord<mratsim> @Zedeus UncheckedArray != ppointer
16:18:01FromDiscord<mratsim> ptr UncheckedArray is equivalent to a C pointer or a C array
16:18:08FromDiscord<mratsim> it's a single indirection
16:18:12zedeuswhat is UncheckedArray by itself then?
16:18:25FromDiscord<mratsim> a C dynamic unsized array
16:18:46FromDiscord<mratsim> `int arr[]`
16:19:20FromDiscord<mratsim> the name is "flexible array member"
16:21:31zedeusso `UncheckedArray[int]` is `int arr[]` but `ptr UncheckedArray[int]` is `int *arr`
16:21:51FromDiscord<mratsim> yes
16:22:03FromDiscord<mratsim> it's the same in C
16:22:06zedeusI can't figure out how to use UncheckedArray without ptr, any cast I try fails and using it in an object (like in the manual) leads to "'UncheckedArray[char]' in this context: 'Nice' for var"
16:22:23FromDiscord<mratsim> you can't
16:22:36*PMunch quit (Quit: leaving)
16:22:38FromDiscord<mratsim> you can't have unsized objects on the stack
16:22:56zedeusis the manual wrong then? I feel like I'm missing something
16:23:14FromDiscord<mratsim> also UncheckedArray MUST be the last field of an object: https://github.com/mratsim/trace-of-radiance/blob/master/trace_of_radiance/io/h264.nim#L20-L25
16:23:25FromDiscord<mratsim> that's a C requirement
16:23:36zedeusyeah I did that
16:23:40zedeushttps://nim-lang.org/docs/manual.html#types-unchecked-arrays
16:57:18*martinium quit (Remote host closed the connection)
17:00:19zacharycarterhmm I'm generating some wrapper code using Nimterop and some of the types have array members
17:00:28zacharycarterand some have multi dimensional array members
17:00:39FromDiscord<Technisha Circuit> Could i use NimScript as a alternative to json in Nim?
17:00:43zacharycarterI've been having to overload `[]` and `[]=` for each of these types
17:00:51*dddddd joined #nim
17:00:58zacharycarterwhich is annoying, but fine - I'm pretty sure there's a better way
17:01:01zedeusNimScript is not a datatype
17:01:08FromDiscord<Technisha Circuit> Ik
17:01:17FromDiscord<Technisha Circuit> But could i use it that way?
17:01:27zedeuswhy would you do that
17:01:32zacharycarterthese overloads work for single dimension arrays but not multidimensional
17:01:39zacharycarterI figured I could used nested openarrays but nope
17:01:46FromDiscord<Technisha Circuit> > why would you do that↵Just curious
17:03:03zacharycarterso I'm not quite sure what to do here...
17:03:17zedeusthe answer to "can I do X" is yes 99% of the time, but "should I do X" is also no 99% of the time, asking if you could do it is a waste of time
17:06:09*dcmertens joined #nim
17:09:12bungI dont think so
17:10:01dcmertensUgh, nim's lack of incremental compile (https://github.com/nim-lang/RFCs/issues/46) bit me really hard yesterday
17:10:33dcmertensI plan on writing lots of short nim programs that plot, and compiling a simple program that uses nim's version of ggplot2 takes 25 seconds every time
17:10:50zedeuseasy fix, get a better cpu
17:12:23dcmertenssure
17:12:25*rockcavera quit (Remote host closed the connection)
17:12:36dcmertensbut in the meantime, I think I'll hack on some PLplot bindings
17:12:43zacharycarterI don't even understand why I have to overload `[]` for all of these types...
17:12:50dcmertensnot because PLplot is beautiful, but because they'll have zero nim dependencies
17:13:04dcmertensplus, it'll give me a good learning exercise
17:13:06dcmertens:-)
17:13:33zacharycarterand whenever I try to provide an overload for a nested array I blow up the call stack
17:13:36zacharycarterwith recursive calls
17:13:38zacharycarterthis is dumb
17:16:51zacharycartercan anyone explain why I'm having to do this to me?
17:16:59zacharycarterI'll cook up an example quickly
17:19:03*vqrs quit (Ping timeout: 272 seconds)
17:20:11*waleee-cl quit (Quit: Connection closed for inactivity)
17:20:24*vqrs joined #nim
17:23:52zacharycarterhttps://play.nim-lang.org/#ix=2nCU
17:24:18zacharycarterwhoops sorry forgot something
17:24:40zacharycarterhttps://play.nim-lang.org/#ix=2nCV
17:24:58zacharycarterI don't understand why the subscript operator won't "just work" here
17:24:59Zevvdoes not compile
17:25:04zacharycarteryeah that's my point
17:25:15Zevvah ok :) I thought you were blowing up the call stack
17:25:24zacharycarterwell I can make it do that :P
17:25:29zacharycarterif I try to provide an overload for `[]`
17:25:37zacharycarterbut I don't understand why I need to overload this in the first place
17:25:46*casaca quit (Quit: leaving)
17:25:50zacharycarternor how to do it so I don't have to do it for every type I define like this
17:26:27ZevvThe distinct is messing stuff up
17:26:30zacharycarterah
17:26:31Zevvyou're indexing with an int
17:27:18zacharycarterso I need a converter? int to what? Ordinal?
17:28:15Zevvhttps://play.nim-lang.org/#ix=2nCW
17:28:17Zevvbe explicit
17:29:27zacharycarterthanks
17:30:30leorizeshashlick: why does a bunch of nimterop apis require `static:`?
17:30:38leorizecan we make do without them?
17:31:11leorizelike the entirety of nimterop functions at compile time, it's kinda weird to have APIs needing `static:` to work
17:39:25*fredrikhr quit (Ping timeout: 265 seconds)
17:43:45FromDiscord<mratsim> static enforce compile-time evaluation
17:44:09FromDiscord<mratsim> you can have template that call static internally as API though
17:50:23Zevvwhere's disbot?
17:50:28Zevvhe ded?
17:50:50leorize!repo disbot
17:50:56leorizeyea he ded
17:50:58leorizeping disruptek
17:53:31*Vladar joined #nim
17:53:58*Guest53197 quit (Ping timeout: 256 seconds)
17:56:08*avatarfighter joined #nim
17:56:24*avatarfighter quit (Client Quit)
17:59:32shashlickthey are procs - used to be macros then i was pushed to make them this way
18:02:27shashlickhttps://github.com/nimterop/nimterop/pull/102
18:07:41*rockcavera joined #nim
18:09:00FromDiscord<willyboar> ~stream
18:17:52*casaca joined #nim
18:23:20FromDiscord<Technisha Circuit> How would i increase the speed of the speed of the compiler?
18:25:01zedeushttps://github.com/nim-lang/compilerdev
18:25:03zedeushere's some ideas :)
18:25:28Zevvyou want to increase it's acceleration?
18:25:56FromDiscord<Technisha Circuit> O
18:26:19FromDiscord<Technisha Circuit> > you want to increase it's acceleration?↵It takes a while to compile larger files, so i want to spend that up somehow
18:26:27leorizeshashlick: personally I think this is a misuse of the `{.compileTime.}` pragma
18:26:46leorizenow we have to put everything in static blocks
18:26:53leorizeno not everything, just some of them
18:27:03leorizemakes the api a bit weird
18:27:11ZevvTechnisha Circuit: I'm a bit curious what kind of files you are compiling, since Nim is pretty fast as it is already
18:27:36leorizehe could be compiling a proc with a thousand parameters or so :P
18:27:44leorizethat can take several days, ask PMunch
18:27:57FromDiscord<Recruit_main707> he is compiling it in android i think
18:28:20Zevvoh right :/
18:32:52*dadada joined #nim
18:33:16*dadada is now known as Guest49863
18:33:37FromDiscord<Technisha Circuit> Yup
18:33:49FromDiscord<Technisha Circuit> Android compiling times are super slow ;-;
18:34:08Zevvyeah, well, don't blame that on the compiler :)
18:35:05FromDiscord<Rika> get a better phone or ***dont compile on a phone***
18:35:35FromDiscord<Technisha Circuit> The only device i have to code on ***is my phone***
18:35:41FromDiscord<Rika> why.
18:35:48FromDiscord<Technisha Circuit> And my phone is a p30 lite
18:35:51FromDiscord<Technisha Circuit> So it's decent
18:36:00FromDiscord<Rika> okay so why do you only have a phone
18:36:03FromDiscord<Technisha Circuit> > why.↵Because i have no access to my pc
18:36:20FromDiscord<Technisha Circuit> My pc is in another city so ;-;
18:36:22FromDiscord<Avatarfighter> ngl i think compiling on a phone is the coolest thing I've heard today
18:36:23FromDiscord<Rika> so is it that you dont have a pc or you cant use your pc
18:36:24FromDiscord<Rika> ssh????
18:36:40FromDiscord<Rika> or is it off
18:36:50FromDiscord<Technisha Circuit> > ngl i think compiling on a phone is the coolest thing I've heard today↵I have been coding on my phone for about 3 years now
18:36:53FromDiscord<Technisha Circuit> It's off
18:36:56FromDiscord<Rika> i see
18:37:05FromDiscord<Technisha Circuit> And it's too loud to keep on so my dad would turn it off anyway
18:37:17FromDiscord<Technisha Circuit> And i think ny dad turned off my rpi
18:37:26FromDiscord<Technisha Circuit> Or the ip changed because I can't access it anymore
18:37:37FromDiscord<Technisha Circuit> (edit) 'ny' => 'my'
18:39:30FromDiscord<Recruit_main707> can you create a nimble package that doesnt need compilation?
18:39:39FromDiscord<Rika> what
18:39:54FromDiscord<Recruit_main707> like, it just includes the source files
18:40:11FromDiscord<Recruit_main707> and they are compiled when used
18:40:18FromDiscord<Technisha Circuit> Doesn't it get compiled when imported?
18:40:36FromDiscord<Technisha Circuit> Isn't that how it works already? Or am I stupid?
18:40:38FromDiscord<Recruit_main707> but ive seen that some packages get compiled
18:40:45FromDiscord<Technisha Circuit> Some packages
18:40:52FromDiscord<Rika> huh?
18:41:02FromDiscord<Rika> there are packages that are source only
18:41:10FromDiscord<Rika> and compiled on use
18:41:15FromDiscord<Technisha Circuit> Because they are either hybrid or an app (take this with a grain of salt)
18:41:25*abm joined #nim
18:41:29FromDiscord<Recruit_main707> i guessed they existed obv, but how is that done?
18:41:39FromDiscord<Rika> initialize it as a library
18:41:43FromDiscord<Rika> in nimble init
18:50:29shashlickleorize: what do you propose
18:50:37shashlickpath forward
18:50:49shashlicki don't like the static blocks either
18:51:35FromDiscord<Recruit_main707> who wants to create a flac-like tool for nim?!
18:52:34FromDiscord<Rika> ?!
18:52:47FromDiscord<Rika> i dont mind trying to write metaflac in nim
18:53:10FromDiscord<Recruit_main707> i dont think my brain can take it, but i dont want to do it manually
18:53:23FromDiscord<Rika> why the ?! btw
18:53:34FromDiscord<Recruit_main707> repersents fake excitement
18:55:04FromDiscord<Rika> it's more of shock to me
18:55:48FromDiscord<Recruit_main707> yeah, its not easy to transmit feelings with plain text :)
18:56:24FromDiscord<Rika> fuck plain text lets engineer a text that can convey emotion
18:56:42FromDiscord<Recruit_main707> just after i finish flatc-nim
18:57:45*waleee-cl joined #nim
19:00:11*bjorob joined #nim
19:01:14*MortS quit (Ping timeout: 260 seconds)
19:01:21FromGitter<kaushalmodi> ?! is interrobang .. there was an interesting podcast episode on that on 99% Invisible podcast
19:02:48*MortS joined #nim
19:04:00*tane joined #nim
19:04:10*Guest49863 is now known as dadada
19:04:27dadadado we have an int like type that defaults to -1 ?
19:05:04dadadaI think this could be useful for procs/templates whose default return value should be that something doesn't exist or is invalid, and sometimes 0 is a valid value
19:05:46dadadafor example 0 is a valid index of an array, while -1 isn't
19:06:24dadadafor example when
19:08:47FromDiscord<Recruit_main707> ts2nim works?↵i mean, it works fine?
19:09:13FromDiscord<Recruit_main707> can it transpile all or most typescript code situations to nim?
19:09:31FromGitter<kaushalmodi> dadada: Looks like you need Options
19:12:40FromDiscord<Rika> Recruit its being worked on
19:12:47FromDiscord<Rika> try it and see if it works
19:13:37*MortS quit (Quit: leaving)
19:14:11FromDiscord<Recruit_main707> just thinking on the fact that using flatc w/ typescript, transpiling it to nim could work puts an smile on my face
19:21:26codichow can i get the whole line as a string that contains a substring?
19:22:11codicThat sounds confusing. let me try again. if i have a string that's multi line, how do i get the whole line that contains/starts with a substring?
19:36:37codichighlight/ping me if you have an answer
19:37:30FromGitter<kaushalmodi> codic: `if s.contains(substr): echo s` ?
19:38:15codicthat's to check if it contains the substr
19:38:17codicnot what i want
19:38:23codicI want to get the whole line that contains the substr
19:38:37FromDiscord<Elegant Beef> The strscans or regex modules is where you want to look
19:40:44*lritter joined #nim
19:42:30*kradnoel joined #nim
19:42:46codici'd rather not use regex, but if i had to can you give an example
19:46:44Zevvcodic: I think most effective would be to find the offset of the substring, and then seach backwards and forwards for newlines
19:47:46Zevvif performance is not really an issue you can iterate over all the lines of your string with lines(), and then check each individual line for your string.
19:49:47*haxscramper quit (Remote host closed the connection)
19:51:14*sschwarzer joined #nim
19:52:02*dcmertens quit (Ping timeout: 272 seconds)
19:53:45sschwarzerAs an experiment, I've implemented a lazy tree iterator where you can delete nodes while iterating. This is a follow-up on https://forum.nim-lang.org/t/5697#35547 . The code is at https://hg.sr.ht/~sschwarzer/lazytree/browse/src/lazytree.nim and tests at https://hg.sr.ht/~sschwarzer/lazytree/browse/tests/test_lazytree.nim . I thought I'd ask for review/feedback before posting the new code in the forum.
19:53:59sschwarzer:-)
19:55:45sschwarzerI hope I don't have bugs this time. ;-) At least I trust the new code much more than the old. :)
19:56:33FromGitter<kaushalmodi> narimiran: Does `koch docs` run as part of CI?
19:56:51FromDiscord<Technisha Circuit> What's flatc?
19:56:53FromGitter<phdye> Can anyone point me at details of how to create static/global/non-heap data structures in a shared library for loading in another app ? I've tried plain objects (not refObj) but accessing the object causes crashes. I'm shooting to emulate pretty vanilla, albeit low-level, C behavior here.
19:57:24FromGitter<kaushalmodi> narimiran: I am trying to understand why I see this error locally: https://github.com/nim-lang/Nim/issues/14485 while the nim CI is green
19:57:26disbot`koch docs` (`nim doc lib/pure/strutils.nim`) fails [devel] [regression] ; snippet at 12https://play.nim-lang.org/#ix=2nDS
19:57:42leorizephdye: plain objects doesn't work?
19:57:48leorize@phdye
19:58:01leorizemake sure the types are C-compatible
19:58:16leorizeie. use cint instead of int, etc
19:58:59leorizealso tag the type with `{.bycopy.}`. this removes all C-incompatible optimization that nim might introduce
19:59:08FromGitter<kaushalmodi> narimiran: Ah, I just got a Doc CI failure email for a PR .. so it is indeed run, but it doesn't affect the "green" status of CI
19:59:13FromGitter<phdye> Are objects themselves c-compatible ? I'm reproducing the c structures exactly with the C types. cint, culong, etc
19:59:38FromGitter<phdye> .bycopy., I wil try that.
19:59:39leorizethey are as long as you don't use inheritance / dynamic dispatching
19:59:54leorizeC FFI in Nim is done primarily through objects
19:59:59FromDiscord<Technisha Circuit> Also, is there a way to update nim via nimble? :P
20:00:12leorizeno
20:00:24leorizeuse choosenim :P
20:00:29FromDiscord<Elegant Beef> That's what we have choosenim for
20:00:32leorizeyou have nim, should be easy to build choosenim
20:00:57FromDiscord<Technisha Circuit> I'm trying to use repl.it :p
20:01:13FromDiscord<Technisha Circuit> It has nim `0.14.2` :p
20:01:19dom96or just install choosenim, pre-built binaries exist after all
20:02:06FromDiscord<Technisha Circuit> How would i do it on repl.it? :P
20:02:07leorizethey are on android
20:02:14leorizeTechnisha Circuit: you can't :P
20:02:16FromDiscord<Technisha Circuit> ?
20:02:20FromDiscord<Technisha Circuit> Oof
20:02:32FromDiscord<Technisha Circuit> Repl.it is an x86 ubuntu machine
20:02:32leorizeuse the playground?
20:02:38FromDiscord<Technisha Circuit> (edit) 'Repl.it is an x86 ubuntu machine ... ' => 'Repl.it is an x86 ubuntu machinethough'
20:02:38leorizewe have like the latest nim there
20:02:45FromDiscord<Technisha Circuit> I want to run a discord bot
20:02:47FromDiscord<Technisha Circuit> :p
20:03:01leorizeand you want to abuse repl.it for that?
20:03:11leorizejesus go for a free hosting somewhere
20:03:39leorizegoogle compute engine got a pretty robust free tier that you can use
20:05:48FromDiscord<dom96> or just spend $5/month on a DO droplet
20:06:02FromDiscord<dom96> or if you're a student get credit for free from them
20:08:49FromDiscord<Technisha Circuit> > and you want to abuse repl.it for that?↵They allow you to do it and I can't use anything that requires a credit card or uses money at all, because my parents won't let me do anything even though I'm 15 :/
20:08:59FromDiscord<Technisha Circuit> I even have to hide discord from them
20:11:06leorizeyou can run it on your rpi then? :P
20:11:20FromDiscord<Technisha Circuit> So you think they'll let me host a discord bot?
20:11:40leorizewill they know that you host one?
20:12:02FromDiscord<Technisha Circuit> It's down rn and I'm hosting stuff for my friend already which makes it a pain
20:12:10FromDiscord<Technisha Circuit> (edit) 'It's down rn and I'm hosting stuff for my friend already which makes it a pain ... ' => 'It's down rn and I'm hosting stuff for my friend already which makes it a painwhen it's online'
20:12:30leorizeyou can go hardcore and host it on your phone :)
20:12:30FromDiscord<Rika> The free credit thing on certain websites don't need a credit card
20:12:43FromDiscord<Technisha Circuit> > will they know that you host one?↵My dad was pissed when he found out i was keeping my pi on 24/7
20:12:45FromDiscord<Rika> Obviously, because students don't ha e credit cards
20:12:48FromDiscord<Technisha Circuit> > you can go hardcore and host it on your phone :)↵Disconnects too much
20:13:10FromDiscord<Technisha Circuit> > The free credit thing on certain websites don't need a credit card↵> Obviously, because students don't ha e credit cards↵Student as in?
20:13:23FromDiscord<Technisha Circuit> Highschool? College?
20:13:28FromDiscord<Rika> Students with an edu email
20:13:34FromDiscord<Technisha Circuit> Don't have that
20:13:42leorizethere was a post on HN with a bunch of free services
20:13:54leorizemaybe you can dig out smt that works there
20:14:00FromDiscord<Rika> Heroku or smth
20:14:29FromDiscord<Technisha Circuit> Is this allowed? https://thetechrim.com/get-free-edu-email-2020/
20:14:46FromDiscord<Technisha Circuit> > Heroku or smth↵Only lets you run a bot for less then a month
20:15:01FromDiscord<Rika> Do you need it 24 7
20:15:35FromDiscord<Rika> Because I'm pretty sure free won't get you 24 7
20:16:09FromDiscord<willyboar> Ask your father to get you a $5 DO. How old he is?
20:16:26FromDiscord<Rika> I doubt that would work, willy
20:16:34leorizegiven how their father don't even let them run a pi overnight
20:16:36FromDiscord<Rika> His father sounds very strict
20:16:57disruptekthreaten him with covid.
20:17:06leorizeand iirc a pi took barely a watt or two to run
20:17:17FromDiscord<Technisha Circuit> > Because I'm pretty sure free won't get you 24 7↵Repl works for that with a webserver being pinged every night
20:17:25FromDiscord<willyboar> I would love my daughter in 5 years to ask me for a $5 DO to play with
20:17:26FromDiscord<Technisha Circuit> > and iirc a pi took barely a watt or two to run↵Yeah :)
20:17:30FromDiscord<Technisha Circuit> (edit) ':)' => ':/'
20:17:44sschwarzerdisruptek: probably not helpful ;)
20:17:44leorizewell if your house got a good router you can hack it to run your server (I did :p)
20:17:56sschwarzerleorize :-D
20:17:59FromDiscord<Technisha Circuit> What.
20:18:12FromDiscord<Technisha Circuit> I'm using a Sky Q router :p
20:18:46FromDiscord<willyboar> disruptek: today is your day off?
20:19:04disrupteknah, i cannot afford nim anymore.
20:19:20FromDiscord<willyboar> 😦
20:19:39FromDiscord<Elegant Beef> Yea it's sad that nim went for the paid MIT model
20:19:46FromDiscord<Elegant Beef> 😄
20:20:05FromDiscord<Technisha Circuit> What's MIT? A license?
20:20:18FromDiscord<Elegant Beef> It's a permissive FOSS license
20:20:22FromDiscord<Technisha Circuit> O
20:20:42FromDiscord<Technisha Circuit> Sp basically what you can and can't do with the source code for Nim?
20:20:59FromDiscord<Elegant Beef> Well nim is licensed as MIT, so you can do anything aslong as you give proper attribution
20:21:11FromDiscord<Technisha Circuit> Oh okay
20:21:24FromDiscord<Technisha Circuit> But you have to pay for a MIT license?
20:21:30leorizelooks like your router can't do openwrt
20:21:31FromDiscord<Elegant Beef> No it was a joke
20:21:37FromDiscord<Technisha Circuit> Oh
20:21:50FromDiscord<Technisha Circuit> > looks like your router can't do openwrt↵What's that?
20:22:01leorizea custom linux firmware
20:22:05FromDiscord<Technisha Circuit> O
20:22:28leorizeif you have a router that supports it you basically got yourself an another linux machine that you can do hosting on :P
20:22:37FromDiscord<Technisha Circuit> Oo
20:22:45FromDiscord<willyboar> I think you should ask your father to pay for a server
20:22:47*tdc quit (Ping timeout: 246 seconds)
20:22:55FromDiscord<Technisha Circuit> You think he would?
20:22:56FromDiscord<Rika> I told you
20:22:57lmariscalhttps://www.reddit.com/r/nim/comments/gse03n/git_mirror_for_nimble_packages_httpsregnimmoe/
20:23:01lmariscalJust wanted to share
20:23:02FromDiscord<Rika> He likely will not
20:23:05FromDiscord<willyboar> you can try
20:23:06FromDiscord<Technisha Circuit> He would ask what for
20:23:16FromDiscord<willyboar> and then hack everything
20:23:18FromDiscord<Technisha Circuit> And then i can't tell him because discord
20:23:21leorize"I want to host my portfolio" :)
20:23:26FromDiscord<Technisha Circuit> Haha
20:23:37zacharycarterjust steal his credit card
20:23:49FromDiscord<Technisha Circuit> Oh god, I'm planning on buying an rpi 4b with 8gb ram aswell
20:23:50FromDiscord<willyboar> tell him you want to make experiments in programming
20:24:04FromDiscord<Rika> Rpis have 8gb ram???
20:24:11FromDiscord<Technisha Circuit> > tell him you want to make experiments in programming↵"Always testing never making money"
20:24:14FromDiscord<Rika> The future is now, I guess...
20:24:15FromDiscord<Technisha Circuit> Mhm, new post
20:24:25FromDiscord<Elegant Beef> The top of the line does
20:24:38FromDiscord<Rika> Last time I checked it was 4
20:24:41FromDiscord<Rika> Not 8
20:24:45leorizeand yet he lets you own a rpi :P
20:24:55zacharycarteruse the rpi as your discord bot server
20:25:06FromDiscord<Elegant Beef> https://media.discordapp.net/attachments/371759389889003532/715661953728774214/unknown.png
20:25:09leorizemost of them have wifi so you can just hid it somewhere in your room and he won't turn it off :P
20:25:32codicXD
20:25:40zacharycarterI think you should just move out
20:25:42zacharycarterget your own place
20:25:50zacharycarterdrop out of school - you know do you
20:25:54leorizethe kid is 15, not yet :P
20:26:03sschwarzerzacharycarter: move out with 15?
20:26:08zacharycartersure why not
20:26:17FromDiscord<Elegant Beef> Hey if you swap the 1 and 5 he's 51
20:26:23zacharycarterwhat are numbers anyway?
20:26:34sschwarzerElegant Beef: sounds legit ;)
20:26:36codichey if you reverse 001 a 1 year old is 100
20:26:44FromDiscord<Elegant Beef> Fact
20:26:46zacharycarterI mean you're really as old as you feel
20:27:01zacharycarterI'm 35 and I feel like I'm 135
20:27:10FromDiscord<Technisha Circuit> > and yet he lets you own a rpi :P↵@leorize[IRC]#0000 he lets me own a pi but not keep it on as a server
20:27:13sschwarzerzacharycarter: but maybe he can't convince his father of that ;)
20:27:17FromDiscord<willyboar> lol i am 38 and i feel like 20
20:27:36zacharycarterthat's why he needs to move out
20:27:38codic38.reverse? you are 83 ;)
20:27:38leorize@Technisha he can't make you not keep it on if he don't know it's on :)
20:27:43zacharycarterbe all rebellious and shit
20:27:53zacharycarterf the system
20:27:58zacharycarterget yoself a discord bot server
20:28:20FromDiscord<Pixeye> I'm 30 and feel like 30 )
20:28:27FromDiscord<Elegant Beef> Holyshit Pixeye!
20:28:30*konvertex quit (Ping timeout: 260 seconds)
20:28:31zacharycarterpretty good
20:28:37FromDiscord<Elegant Beef> You're a nim brethern now!
20:28:38zacharycarterright on track in fact
20:28:41codic> he can't make you not keep it on if he don't know it's on :)
20:28:41codicwait, how would he not know that. raspberry pi's have blinking lights at the firmware level when on :P
20:28:41codicUsed to be diasble-able, not anymore it seems
20:28:47FromDiscord<willyboar> and if you want to pass the limits get yourself both discord and slack bots
20:28:56codicwut
20:28:56FromDiscord<Elegant Beef> *It's beef from the GDL discord pixeye*
20:28:57leorizecodic: well powerline + a drawer
20:29:04sschwarzerI don't know how old I feel because I don't know how I'd feel at any age not my own. ;-)
20:29:07leorizewifi took care of the connection
20:29:09leorizeez
20:29:15codicleorize: true
20:29:17FromDiscord<Pixeye> @Elegant Beef glad to see you here : )
20:29:25zacharycarterwut is GDL?
20:29:27FromDiscord<Elegant Beef> Put the rpi inside of your pc case and power it with a 5v line from your PC
20:29:33FromDiscord<Elegant Beef> It's a game dev discord server
20:29:39zacharycarteroh
20:29:41FromDiscord<Elegant Beef> Quite a few of us are here
20:29:52FromDiscord<Elegant Beef> Gary M for instance i introduced to nim
20:29:55codicbut if you turn on the pc for the power, it'd make noise
20:30:06codicoh, `GDL` seems cool
20:30:19sschwarzerWhat/who is GDL?
20:30:33codic> <Elegant Beef> It's a game dev discord server
20:30:37FromGitter<phdye> So, about the static objects, it looks like one must call NimMain() to create them. So they are not statically allocated after all.
20:30:38FromDiscord<Pixeye> a server where we post about games we make )
20:30:39FromDiscord<Elegant Beef> Game Developer League > It's a game dev discord server
20:30:41sschwarzerah, right
20:30:56FromDiscord<Elegant Beef> Nah pixeye i just help noobs in the unity discord
20:31:04codicnim is just amazing for writing package managers and gtk apps :p
20:31:08FromDiscord<Elegant Beef> Biding my time until i get a slightly easy non godot 3D engine
20:31:15FromDiscord<Elegant Beef> (edit) 'Biding my time until i get a slightly easy non godot 3D engine ... ' => 'Biding my time until i get a slightly easy non godot 3D enginein nim'
20:31:48codicalso, um, about the rpi discussion... #nim-offtopic (discord #offtopic)? :p
20:31:50FromDiscord<Pixeye> well, I finished with Unity framework, hope to finish the game soon in Unity and migrate to nim totally.
20:32:08FromDiscord<Pixeye> (edit) 'nim' => 'Nim'
20:32:13leorize@Technisha uh move to #offtopic? :P
20:32:27zacharycarterUnity framework? like the game engine?
20:32:31FromDiscord<Elegant Beef> Yea
20:32:46zacharycarteroh well Nim is not a replacement for Unity just FYI
20:32:54zacharycarterNim has nothing like Unity
20:32:56codici wish nim had unity bindings
20:33:04sschwarzerPixeye: to Nim + Unity or Nim + Godot?
20:33:27FromDiscord<Elegant Beef> I mean that's why i said biding my time, i dont expect an engine with 1:1 features to unity, just a easy to use 3D renderer that i can do most of the rest myself
20:33:27zacharycarterUnity doesn't have an API to write bindings for...
20:33:39FromDiscord<Elegant Beef> Closest you could do is write native libraries
20:33:44FromDiscord<Pixeye> @Zachary Carter ↵https://github.com/PixeyeHQ/actors.unity - it's just ecs + some stuff for making games in Unity more pleasant : )
20:33:52zacharycarterElegant Beef: I was trying to explain that to Pixeye
20:33:58FromDiscord<Elegant Beef> Ah
20:34:00FromDiscord<Elegant Beef> Sorry
20:34:02zacharycarternp
20:34:11FromDiscord<Elegant Beef> Pixeye do you do desktop builds often?
20:34:16zacharycarterPixeye: yeah but you do realize unity is a game engine and Nim is a programming language right?
20:34:16FromDiscord<Pixeye> y
20:34:20FromDiscord<Elegant Beef> <https://github.com/beef331/unity-auto-builder>
20:34:20FromDiscord<Technisha Circuit> > @Technisha Circuit he can't make you not keep it on if he don't know it's on :)↵I tried that, but i need black tape
20:34:26FromDiscord<codic> #offtopic
20:34:31FromDiscord<Pixeye> @Zachary Carter absolutely 🙂
20:34:36zacharycarterokay, just making sure :)
20:34:46zacharycarteri
20:34:46FromDiscord<Elegant Beef> We both want to move towards a non Unity game engine i assume
20:34:57FromDiscord<Elegant Beef> Pixeye that can async build projects from git repos
20:35:12FromDiscord<Elegant Beef> So for my small game jam takes 30 seconds after the inital openning to build win,mac, and linux
20:35:17FromDiscord<Elegant Beef> opening*
20:35:45FromDiscord<Elegant Beef> And you have the abillity to automate uploading to platforms or whatever
20:36:10FromDiscord<Technisha Circuit> My birth dad is gonna buy me an rpi 4b with 8gb, so my stepdad can't really do much
20:36:40FromDiscord<Elegant Beef> I havent got around to making the itch.io uploader, since I need to look at making archives with nimarchive
20:36:41FromDiscord<codic> Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaah
20:36:44FromDiscord<codic> #offtopic
20:36:46FromDiscord<Rika> You okay?
20:36:49FromDiscord<Pixeye> I'll just try to use nim + opengl + my stuff to make games. I'm not looking for another engine. : )
20:36:56FromDiscord<Elegant Beef> We're talking about nim
20:36:59FromDiscord<Technisha Circuit> @codic stop being extra
20:37:09FromDiscord<Elegant Beef> Yea im really just looking for a easy to use 3D renderer
20:37:16FromDiscord<codic> What?↵Also, does unity have nim bindings?
20:37:20FromDiscord<Elegant Beef> No
20:37:21FromDiscord<Pixeye> nope
20:37:28FromDiscord<codic> aw
20:37:30FromDiscord<Elegant Beef> Unity doesnt have language bindings it's closed source and has no support
20:37:35FromDiscord<codic> oh
20:37:36FromDiscord<Elegant Beef> C# or native libraries
20:37:38FromDiscord<codic> Nvm then
20:37:53FromDiscord<Recruit_main707> ue4 kind of has! (and its better than unity imo)
20:38:00FromDiscord<Rika> Fuck unity!
20:38:03FromDiscord<Elegant Beef> UE4 is owned by epic, you played yourself
20:38:13FromDiscord<Elegant Beef> UE4 also forces you to use shader nodes to make shaders
20:38:16FromDiscord<Elegant Beef> So it's shit
20:39:08FromDiscord<Pixeye> @Elegant Beef btw
20:39:19FromDiscord<Pixeye> have u heard about beef language ? XD
20:39:21FromDiscord<Elegant Beef> Yea
20:39:49FromDiscord<Elegant Beef> Less interested in it since it doesnt have any memory management afaik, and im a lazy arsehole
20:40:04FromDiscord<Elegant Beef> When this is your only method of writting shaders you've made a grave mistake↵https://docs.unrealengine.com/en-US/Engine/Rendering/Materials/ExpressionReference/Custom/index.html
20:40:08FromDiscord<Rika> There's always raii
20:40:15FromDiscord<Pixeye> insane how muuch work was done.
20:40:34FromDiscord<Elegant Beef> I do love how all the name spaces are direct 1:1 to C#
20:40:39FromDiscord<Pixeye> ye
20:40:45FromDiscord<Pixeye> C# is awesome anyway
20:40:49FromDiscord<Elegant Beef> But i mean i wanted to try a new paradigm and nim is unique from my past experience
20:41:12FromDiscord<Pixeye> true
20:41:18disruptekthat's kinda how i feel about beastiality.
20:41:22FromDiscord<Elegant Beef> Lol
20:41:46zacharycarterdon't worry the feeling won't last long
20:42:02FromDiscord<Elegant Beef> And plus we've got nimscript, so we could use that for gameplay scripting, whenever that get's more seemless
20:42:25FromDiscord<Elegant Beef> I suppose i more mean for mods
20:42:26FromDiscord<Elegant Beef> But shh
20:43:05FromDiscord<Recruit_main707> has someone ever thought of creating some kind of cclass macro that emits actual c++ classes?
20:43:13FromDiscord<Elegant Beef> Yes, you
20:43:40FromDiscord<Recruit_main707> ive mentioned it before? 😅
20:43:48zacharycarterwhat for?
20:44:01FromDiscord<Elegant Beef> You just mentioned it
20:44:16FromDiscord<Elegant Beef> Uh oh recruit has dementia
20:44:28FromDiscord<Recruit_main707> > what for?↵for the same reason cpp has classes i guess
20:44:47zacharycarterI'm not following
20:45:04zacharycarterif you want to write C++ just write C++?
20:45:43FromDiscord<Recruit_main707> having *actual* classes could be useful in a lot of ways, there is no special reason
20:45:56FromDiscord<Elegant Beef> Yet you didnt give a reason
20:46:04FromDiscord<Recruit_main707> there is none really
20:46:12FromDiscord<Elegant Beef> So then they couldnt be useful
20:46:27FromDiscord<Recruit_main707> there is no specific reason
20:46:40FromDiscord<Elegant Beef> You think they might be useful but you have no reason why to think that
20:46:47FromDiscord<Elegant Beef> Dont see the flaw in the supporting argument?
20:46:55FromDiscord<Recruit_main707> its not about an argument
20:46:59*Vladar quit (Remote host closed the connection)
20:47:06FromDiscord<Recruit_main707> just a thought
20:47:26FromDiscord<Elegant Beef> I mean it's an unsubstantiated statement, so i just felt like you needed some supporting reason D:
20:47:28FromDiscord<Elegant Beef> (edit) 'D:' => '😄'
20:47:29zacharycarterI'm so confused
20:47:36FromDiscord<Elegant Beef> Same
20:48:04FromDiscord<Recruit_main707> lets let it be then
20:49:32FromGitter<yglukhov> Hey everyone, any emacs users around? Has anyone succeeded using lsp-mode with nimlsp?
20:50:12zacharycartermaybe krux02
20:50:17disruptekhey yuri; krux02 is a resident emacs user. i think kashualmodi, too?
20:50:19zacharycarterthere's another emacs user but I can't remember who
20:50:27zacharycarterah yeah kashualmodi
20:50:54*bjorob quit (Ping timeout: 240 seconds)
20:51:50*casaca quit (Remote host closed the connection)
20:52:28*casaca joined #nim
20:55:13*bjorob_ joined #nim
20:55:18leorizeanyone with some experience on how to efficently navigates C++ code?
20:55:25leorizeI hate inheritance tree so much...
20:56:40FromDiscord<Elegant Beef> Yea, you change your mind and work on something else
20:56:43FromDiscord<Elegant Beef> Oh.. just me?
20:58:18zacharycarteroften IDE's ship with some type of outline tool
20:58:28zacharycartershows class hierarchies in a tree view
20:59:11zacharycarterbut I mean - this is a reason why OO languages are more difficult to reasona bout
21:01:25*supakeen quit (Quit: WeeChat 1.9.1)
21:01:49*supakeen joined #nim
21:06:22FromGitter<kaushalmodi> leorize: I use ctags for SystemVerilog, but I have heard ctags and similar tools used by C++ coders
21:06:36FromGitter<kaushalmodi> I use Universal ctags + GNU Global
21:07:35FromGitter<kaushalmodi> I just searched in Emacs reddit.. folks use rtags/irony for C++ indexing
21:08:51FromDiscord<mratsim> > has someone ever thought of creating some kind of cclass macro that emits actual c++ classes?↵@Recruit_main707 in the wiki
21:09:05FromDiscord<Recruit_main707> where?
21:09:30FromDiscord<mratsim> https://github.com/nim-lang/Nim/wiki/Playing-with-CPP--VTABLE-from-Nim
21:09:42FromDiscord<mratsim> warning 2016
21:14:13skrylar[m]hoi
21:18:36*sschwarzer quit (Quit: leaving)
21:26:37*neceve quit (Ping timeout: 264 seconds)
21:32:12FromDiscord<Recruit_main707> has someone thought of creating a c2nim like tool using doxygen to get the relevant information from the c/cpp header files?
21:33:27FromGitter<kaushalmodi> Recruit_main707: nimterop has recently started doing that, for the imported C header files
21:34:20FromDiscord<Recruit_main707> that will save me a lot of time trying things then :)
21:35:06FromDiscord<Recruit_main707> thats something promising
21:38:45FromDiscord<Technisha Circuit> Is it possible to use NodeJS libs in Nim for the js backend?
21:38:50FromDiscord<Recruit_main707> yes
21:38:54FromDiscord<Technisha Circuit> How?
21:39:05FromDiscord<Technisha Circuit> (edit) 'How?' => 'How exactly? Is there any docs for it?'
21:39:09FromDiscord<Recruit_main707> i know you can, not how :P
21:39:13bungsee document modules for js backend
21:39:20FromDiscord<Recruit_main707> ye
21:39:27FromDiscord<Recruit_main707> i think thry mention it there
21:39:27FromDiscord<Technisha Circuit> Oh okay, thanks :P
21:39:49FromDiscord<Technisha Circuit> Also, I'm no longer using comic sans as my system font
21:40:01bungcheck the source then you can wrap a js lib yourself
21:40:10FromDiscord<Technisha Circuit> O oki
21:40:21*Jesin quit (Quit: Leaving)
21:44:44FromDiscord<Technisha Circuit> The page that should apparently have the info needed doesn't exist anymore
21:44:46FromDiscord<Technisha Circuit> https://nim-lang.org/backends.html#the-javascript-target
21:46:07bunghttps://nim-lang.org/docs/lib.html#pure-libraries-modules-for-js-backend check this section
21:48:41FromDiscord<Technisha Circuit> Thanks! Found what i needed!
21:48:53leorizejsffi should get you a long way
21:48:57leorizeand also -d:nodejs
21:52:04*Jesin joined #nim
21:55:18skrylar[m]Recruit_main707: i didn't use doxygen for it, but some of my gtk/gdk stuff uses some hand tweaks to the .h files and a peg parser
21:55:42*xet7 quit (Quit: Leaving)
22:04:38*idf quit (Ping timeout: 246 seconds)
22:04:49*casaca quit (Remote host closed the connection)
22:08:20FromDiscord<Technisha Circuit> Yup
22:09:25FromDiscord<Technisha Circuit> How would i convert the generated js code to es6?
22:09:35*casaca joined #nim
22:09:48*tane quit (Quit: Leaving)
22:09:48FromDiscord<Technisha Circuit> Is there a way to do it with nim? If not, what tools would i use?
22:10:08FromDiscord<Technisha Circuit> I'd preferably would like to do it in a script I'm doing
22:10:43FromDiscord<dom96> why es6?
22:11:38PrestigeI mean there are general JS tools to convert code to differernt targets like babel or webpack but why?
22:11:51leorizejust write nim instead :P
22:18:40*NimBot joined #nim
22:23:27FromDiscord<Technisha Circuit> Because I'm writing this for a friend who only knows JS
22:23:39FromDiscord<Technisha Circuit> And plus, i am just extra for no reason
22:24:04leorizeand you think your friend will want to consume Nim-produced js? :p
22:24:15FromDiscord<Technisha Circuit> Mhm
22:24:32disrupteka friend named node.
22:25:03*zacharycarter quit (Ping timeout: 265 seconds)
22:25:03FromDiscord<Technisha Circuit> sent a code paste, see https://discordapp.com/channels/371759389889003530/371759389889003532/715692132848893992
22:25:29FromDiscord<Technisha Circuit> I have the require function available now
22:26:33leorizeix.io glitched so we now hav a link to the discord message
22:26:45leorizeand it want me to login so no :P
22:28:00FromDiscord<Technisha Circuit> Oof
22:28:13FromDiscord<Technisha Circuit> https://media.discordapp.net/attachments/371759389889003532/715692929301086238/Screenshot_20200528_232804_com.cutthecord.base.jpg
22:28:30FromDiscord<Technisha Circuit> https://media.discordapp.net/attachments/371759389889003532/715693005171982346/Screenshot_20200528_232824_com.termux.jpg
22:28:42leorizeyou know dimscord exists right?
22:28:47FromDiscord<Technisha Circuit> And that's what i have so far
22:28:52FromDiscord<Technisha Circuit> Ik, this is just a test?
22:29:03FromDiscord<Technisha Circuit> Also, my friend is an actual person surprisingly
22:29:15leorizewell then basically require() returns a JsObject
22:29:24FromDiscord<Technisha Circuit> Yeah
22:29:29leorizestore that somewhere and you can start calling functions
22:29:59FromDiscord<Technisha Circuit> Did that
22:30:07leorizejsffi should let you do all this without writing a single line of wrapping code
22:30:12FromDiscord<Technisha Circuit> `let discord = require "discord.js"`
22:30:16leorize(except for the require` proc
22:30:35FromDiscord<Technisha Circuit> 'p
22:30:41FromDiscord<Technisha Circuit> (edit) ''p' => ':p'
22:32:52codicis there anything like strutils.removePrefix that returns the string instead of modifying it
22:33:14leorizeuse sugar.dup
22:33:25codicwhat's that?
22:33:30codicwait, lemme see
22:33:41codic> Turns an in-place algorithm into one that works on a copy and returns this copy. Since: Version 1.2.
22:33:45codicthat is just epic
22:35:15FromDiscord<Technisha Circuit> How does sugar.dup work? `dup("abc".removePrefix("a"))`?
22:35:39FromDiscord<Technisha Circuit> So that would return `bc`?
22:35:41codic!eval import sugar, algorithm, strutils; var thing="po"; var thing2:string; thing2=thing.dup(thing.removePrefix("p")); echo thing2
22:35:44NimBotCompile failed: /usercode/in.nim(1, 93) Error: type mismatch: got <string, string, string>
22:36:23FromDiscord<Technisha Circuit> Oof
22:36:36codic!eval import sugar, algorithm, strutils; var thing="po"; var thing2,thing3:string; thing2=thing; thing3.dup(thing2.removePrefix("p")); echo thing3
22:36:38NimBotCompile failed: /usercode/in.nim(1, 109) Error: type mismatch: got <string, string, string>
22:36:51codicum i'm not sure
22:37:00FromDiscord<Technisha Circuit> Is there any projects to convert Nim code to other languages besides the included ones?
22:37:01leorize!eval import sugar, strutils; var thing = "po"; let thing2 = thing.dup(removePrefix("p")); echo thing2
22:37:04NimBoto
22:37:27leorizecodic: ^ that's how you use it
22:37:29codicoh
22:37:33codicNice
22:37:34leorize@Technisha not that I know of
22:37:35codicThank you
22:37:41codicThat is like the most useful feature I've seen
22:37:45codic> <Technisha Circuit> Is there any projects to convert Nim code to other languages besides the included ones?
22:37:47FromDiscord<Technisha Circuit> ~~Like Ruby?~~
22:37:48FromDiscord<Technisha Circuit> Oh
22:37:57codicIf you count nlvm as a language...?
22:38:02FromDiscord<Technisha Circuit> No
22:38:03leorizefunny enough, Nim's 1.2 changelog got better examples on dup than the actual documentation
22:38:17codiclol
22:38:17codic@Technisha otherwise no
22:38:23FromDiscord<Technisha Circuit> Aw
22:38:30codicWhy would you want to anyways
22:38:39FromDiscord<Technisha Circuit> Because memes
22:38:41codicYou can't have a trade of all jacks
22:38:42codicOr jack of all trades
22:38:43codicOr whatever
22:38:46FromDiscord<Technisha Circuit> (edit) 'memes' => 'i can'
22:38:52FromDiscord<Technisha Circuit> How about Haxe thoughm
22:38:56codicYou do know, all edits are visible on irc?
22:38:56FromDiscord<Technisha Circuit> (edit) 'thoughm' => 'though?'
22:39:01FromDiscord<Technisha Circuit> Ik
22:39:09codicHaxe wants to target a ton of languages
22:39:09codicNim doesn't
22:39:20FromDiscord<Technisha Circuit> Ik
22:39:30codicSo what about haxe
22:40:23FromDiscord<Technisha Circuit> There's bound to be people tryna do Nim -> Haxe
22:41:31*abm quit (Quit: Leaving)
22:41:36codicwhy does this fail :\https://hatebin.com/ltnqhfzfci
22:41:37codiceh
22:41:42codicnot really
22:41:43codicit's smal
22:41:46codic * it's small
22:41:55codichighlight me if you have a reply anyone, gtg
22:42:24leorizecodic: without context there isn't much that I can tell you
22:42:43FromDiscord<Technisha Circuit> Wait, what happens if an irc user types `a\nb`?
22:42:49leorizea\nb
22:43:00leorizethings in IRC are sent verbatim
22:43:11leorizeif you means pressing the actual
22:43:18*kradnoel quit (Read error: Connection reset by peer)
22:43:35leorize"return" button, then it will be sent as the "return" symbol
22:43:38leorizereally ugly
22:43:51*kradnoel joined #nim
22:45:13codicyeah
22:45:14codiclike this?
22:45:22codicor does matrix split into two msgs
22:45:28FromDiscord<Technisha Circuit> O
22:45:48leorizematrix splits
22:45:53codicleorize: context https://hatebin.com/cfbbfatdqd
22:46:17leorizewhat's the error message?
22:46:38codiclets see
22:46:45codicOH
22:46:47codicI didn't import sugar
22:46:51leorizelol
22:46:52codicNever mind me
22:46:57codicCOmpiles now
22:47:00leorizeand your algo is a bit inefficient
22:47:00codic*Compiles
22:47:04FromDiscord<Elegant Beef> Secondly for nim you should put the code on nim playground
22:47:15codictrue, but this wouldn't execute on play anyways
22:47:17FromDiscord<Technisha Circuit> How would i do ```client.once("ready", () => {console.log("Ready")});``` in Nim?
22:47:22codicunless i shared my whole program
22:47:26codic@technisha hold on
22:47:30codicgimme a sec
22:47:33leorizecodic: do this: version = line.dup(removePrefix("Version: "))
22:47:35FromDiscord<Technisha Circuit> Ok
22:47:37FromDiscord<Elegant Beef> `proc () = anonymous code here`
22:47:43codicOh, I can do that?
22:47:44leorizethen check if version.len == line.len
22:47:44codicNice
22:47:45FromDiscord<Elegant Beef> I believe sugar has a lambda version
22:47:50codicyes wait
22:48:02codic@Technisha
22:48:05leorizethe lamda syntax looks stupid imo
22:48:05codic`client.once("ready", proc () = echo "ready")`
22:48:13codicor if you like lambdas like me:
22:48:22FromDiscord<Technisha Circuit> > `proc () = anonymous code here`↵wait you talking to me?
22:48:25codic`import sugar; client.once("ready", () => echo "ready")`
22:48:25FromDiscord<Elegant Beef> Yes
22:48:29codicyes they are
22:48:29FromDiscord<Technisha Circuit> O
22:48:30FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2nEw
22:48:32FromDiscord<Elegant Beef> Example
22:48:39leorize`client.once("ready") do: echo "ready"`
22:48:46codichuh?
22:48:48FromDiscord<Elegant Beef> Ah didnt know of do
22:48:51codicthat a shortcut for anonymous proc?
22:49:03codicAnd what about arguments to the lambda?
22:49:08codic/proc
22:49:16leorizedo (a, b: int) -> return_type:
22:49:58leorizehttps://nim-lang.org/docs/manual_experimental.html#do-notation
22:50:06leorizelooks like they moved it to experimental
22:50:12FromDiscord<Technisha Circuit> Oh? Thanks!
22:50:15leorizemakes sense since it caused a fair share of bugs
22:57:05codico
22:57:09codicnoice
22:57:12*casaca quit (Remote host closed the connection)
22:58:51FromDiscord<Technisha Circuit> I need to do```javascript let client = new discord.Client()```in Nim, anyone know how? ```nim let client = discord.Client()``` doesn't work
22:59:20codicpleease don't do multiline codeblocks with triple quotes :\
22:59:27FromDiscord<Technisha Circuit> (edit) 'do```javascript let' => 'do```let' | '```nim let' => '```let'
22:59:39codicAt least riot can parse them if you have the backticks on their own line
22:59:42FromDiscord<Technisha Circuit> That's one message :p
22:59:49codicNo, I mean, you did "```thing```"
22:59:53FromDiscord<Technisha Circuit> Eh
22:59:59codicThe backticks shouldn't be on the same line
23:00:06codicOr other markdown parsers can't parse them
23:00:09FromDiscord<Technisha Circuit> sent a long message, see http://ix.io/2nEx
23:00:17leorize@Technisha: https://nim-lang.github.io/Nim/jsffi#jsNew%2Cauto
23:00:19codicNow it's too long for irc
23:00:27codicBut anyways, yup, jsNew
23:00:36FromDiscord<Technisha Circuit> Oh thanks
23:00:44codictho that docs link is old, `jsNew discord.Client()`
23:00:50leorizeI told you, jsffi got nearly everything :P
23:01:05FromDiscord<codic> Or just do this
23:01:09FromDiscord<Technisha Circuit> It actually works :P
23:01:24FromDiscord<codic> Nvm ignore me
23:01:31FromDiscord<codic> You got a discord bot working?
23:01:36FromDiscord<Technisha Circuit> Yup
23:01:38FromDiscord<codic> Oof
23:01:39FromDiscord<Technisha Circuit> :P
23:01:44codicThat's very sad
23:01:48FromDiscord<codic> Ignore
23:01:58codicMe
23:02:03FromDiscord<codic> Hopping between
23:02:07codicDiscord and Irc/matrix
23:02:27leorizebridge discord to matrix too and you will only have to join matrix :P
23:03:10*codic sighs
23:03:41leorize@Technisha: oh lol jsffi got require() too
23:04:06leorizeyou literally don't have to write a single line of js for that example :P
23:05:20FromDiscord<Technisha Circuit> I did that :P
23:13:04*kradnoel quit (Remote host closed the connection)
23:18:44skrylar[m]welp. looks like its time to find a sourcehut replacement. shrugs.
23:19:47FromDiscord<Technisha Circuit> Is there a way to write pure JS in Nim?
23:20:20FromDiscord<Technisha Circuit> So everything i can do in ES6 JS, i can do in Nim somehow?
23:24:39FromDiscord<dom96> {.emit: """ JS HERE """.}
23:25:32FromDiscord<Technisha Circuit> That has to be in a function, right?
23:25:36FromDiscord<Technisha Circuit> Or am i wrong?
23:27:24FromDiscord<dom96> it doesn;t
23:27:28FromDiscord<dom96> (edit) 'doesn;t' => 'doesn't'
23:27:51FromDiscord<Technisha Circuit> Oh nice
23:29:12skrylar[m]i guess its back to github. or see how evil bitbucket/gitlab is
23:30:33FromDiscord<Technisha Circuit> You could use Codeberg or Gitdab?
23:30:35*casaca joined #nim
23:30:42FromDiscord<Technisha Circuit> They use Gitea
23:30:52FromDiscord<Technisha Circuit> Which is opensource and looks similar to GitHub
23:31:03FromDiscord<Technisha Circuit> They even have a darkmode
23:33:06FromDiscord<Technisha Circuit> Also i was looking for a DSL or something that could do that (or a combination of modules that would let me do that in the C backend preferably, if not, then the JS backend)
23:34:52skrylar[m]yea i dunno yet. i thought it would be nice to have an off-github mirror for durability, but now devault wants to impose license requirements on everyone on srht
23:35:20FromDiscord<Technisha Circuit> Devalult?
23:48:00FromDiscord<Avatarfighter> Does the xmlparser library handle mismatched tags? e.g: "<a><h2>test</a></h2>"
23:50:54FromDiscord<zetashift> The good ol Nim is on HN; case-insensitivity bikeshedding: https://news.ycombinator.com/item?id=23333955
23:53:11leorizeAvatarfighter: use htmlparser, it can handle that iirc
23:53:25leorizeskrylar[m]: you can move to sourcehut
23:53:42leorizeoh wait sourcehut is imposing license reqs?
23:54:26FromDiscord<codic> `stdout.styledWrite(fgYellow, &"To install package {debFile} (version {version}) the following dependencies are required: \n{dep.split(", ").join("\n")} \nContinue? ")` Why does this fail to parse
23:54:57skrylar[m]leorize: they are debating it, so i termed my account
23:55:11skrylar[m]if i want big tech politicking i will at least get the benefits of big tech
23:55:20skrylar[m]no point wasting time on small tech doing the same shit
23:55:31leorizethat's sad then
23:55:49leorizecodic: what's the error?
23:56:13FromDiscord<Avatarfighter> leorize: thanks for the suggestion I kind of forgot htmlparser existed
23:58:14FromDiscord<codic> Let me see
23:58:19FromDiscord<codic> /home/codic/coding/nim/soldeb/soldebCli.nim(28, 31) Error: could not parse `dep.split(`.↵/home/codic/.choosenim/toolchains/nim-1.2.0/lib/core/macros.nim(557, 11) Error: expected: ')', but got: '[EOF]'