<< 02-10-2019 >>

00:12:52*teimosso joined #nim
00:12:57FromDiscord<robohack> What is the best way to get input from stdin character by character (don’t wait for new lines)? I also don’t want the typed characters to be automatically echoed so that I can do some things like tab completion. Is getch() the only way?
00:21:51sealmoverobohack
00:21:58sealmoveyou probably have to enter raw mode
00:22:22sealmovehttps://viewsourcecode.org/snaptoken/kilo/02.enteringRawMode.html
00:23:41sealmovegetting input each time \n appears, and characters echoed, is terminal's doing. So you have to configure that.
00:25:08sealmoveI've done this in Nim specifically before, so you can have this for reference: https://github.com/sealmove/hex/blob/master/editor.nim#L24
00:26:57sealmoveI used some templates for easier configuration: https://github.com/sealmove/hex/blob/master/header.nim#L99
00:29:28FromDiscord<robohack> Awesome, thanks for that. I will check it out.
00:29:39*endragor quit (Remote host closed the connection)
00:31:08FromDiscord<robohack> That is what I was looking for!
00:31:20*teimosso quit (Quit: teimosso)
00:31:46*teimosso joined #nim
00:33:08*owl_000 joined #nim
00:33:39*seni quit (Quit: Leaving)
01:03:25*abm quit (Quit: Leaving)
01:16:05*owl joined #nim
01:18:57*owl_000 quit (Ping timeout: 240 seconds)
01:21:29*disruptek is now known as hiding_from_the_
01:58:51*Jjp137 quit (Read error: Connection reset by peer)
02:00:14*teimosso quit (Quit: teimosso)
02:19:27sealmoverobohack you're welcome ;)
02:53:56*go|dfish joined #nim
02:58:48*rockcavera quit (Remote host closed the connection)
03:31:05*hiding_from_the_ is now known as disruptek
03:31:15disruptekdamn straight
03:38:51*theelous3 quit (Ping timeout: 240 seconds)
03:40:11*theelous3 joined #nim
03:49:42*sealmove quit (Quit: WeeChat 2.6)
03:50:43*chemist69 quit (Ping timeout: 245 seconds)
03:52:48*chemist69 joined #nim
03:53:55*narimiran joined #nim
03:56:15*Jjp137 joined #nim
04:37:57*xace quit (Ping timeout: 245 seconds)
04:38:22*ehmry quit (Ping timeout: 245 seconds)
04:38:38*ehmry joined #nim
04:38:47*livcd quit (Ping timeout: 245 seconds)
04:40:06*xace joined #nim
04:45:41*nsf joined #nim
04:47:44*livcd joined #nim
05:12:27*minierolls quit (Ping timeout: 240 seconds)
05:14:51*theelous3 quit (Ping timeout: 240 seconds)
05:32:50*dddddd quit (Remote host closed the connection)
05:36:15FromDiscord<crates> does anyone know how to accept a variable number of types in a generic function? say creating a function like 'view' where 'view[type1, type2, type3]()' and 'view[type1, type2]()' would work
05:37:41FromDiscord<juan_carlos> varargs
05:46:25*navinmistry joined #nim
05:47:51*navinmis_ joined #nim
05:49:43FromGitter<alehander42> you might want to pass them directly
05:49:50*LargeEpsilon joined #nim
05:49:51FromGitter<alehander42> like `view(type1, type2, type3)`
05:50:13FromGitter<alehander42> and use varargs as juan_carlos suggested
05:50:39FromGitter<alehander42> the type of a type is `type` :P
05:50:53*navinmistry quit (Ping timeout: 250 seconds)
05:51:58FromDiscord<crates> cheers I'll give it a shot
06:02:46FromGitter<nickdex> Hello everyone, I recently picked up nim and am using it for contributing to Cosmos (https://github.com/OpenGenus/cosmos) repo. For building a proc to calculate average, I was wondering if I could use generics to ensure only sequence of numeric values could be passed to my proc. Can anyone point me where/what should I start reading? For my I accepting all types and manually checking if its either float or int.
06:03:26Araqsomething like proc p[T: SomeNumber](values: openArray[T])
06:03:50Araqalehander42: the type of a type is actually 'typedesc'
06:03:58*FromGitter quit (Remote host closed the connection)
06:04:16*FromGitter joined #nim
06:06:10*solitudesf joined #nim
06:08:20FromGitter<alehander42> yes, you can use `or`
06:08:52FromGitter<alehander42> there are many builtin combos already
06:09:00FromGitter<alehander42> but they all use `or`
06:09:24FromGitter<alehander42> look at https://github.com/nim-lang/Nim/blob/devel/lib/system.nim#L91
06:09:41FromGitter<alehander42> one of those
06:09:45FromGitter<alehander42> maybe SomeNumber?
06:14:00FromGitter<alehander42> hm, sorry, if you want to pass "sequence" tho, this might not work
06:14:31FromGitter<alehander42> as you can't really create a sequence of A|B
06:17:38FromGitter<alehander42> just use float honestly: it seems most other impl just use this or int
06:23:05*PMunch joined #nim
06:48:34*skoude joined #nim
06:53:27*navinmis_ quit (Remote host closed the connection)
06:57:50*skoude quit (Ping timeout: 276 seconds)
07:00:00*gmpreussner quit (Quit: kthxbye)
07:05:05*gmpreussner joined #nim
07:09:08*navinmistry joined #nim
07:13:24*navinmistry quit (Ping timeout: 252 seconds)
07:13:55Zevv'moin #nim. I recently had some need of benchmarking stuff at compile time, but there is no API avaible for telling time in the VM. A similar thing just came up in the forum, so maybe it would make sense to implement some bare necessities to support this.
07:15:35*Vladar joined #nim
07:17:06Zevvclock() is a poor interface, but it's likely to be the most portable method available. Would it make sense to add this to the VM?
07:21:37*tdc quit (Ping timeout: 240 seconds)
07:25:28PMunchZevv, hmm how does the compiler grab the timestamp of it's compilation time? Is that just a staticExec to something?
07:25:50Zevvnot sure, but good point
07:27:22FromGitter<alehander42> the compiler runs runtime code
07:27:37FromGitter<alehander42> or is that a different timestamp?
07:28:06PMunchI'm talking about the timestamp in "nim --version" that shows the date it was compiled on
07:28:34ZevvDoesn't the compiler also check current time vs file mtime, and things like that?
07:28:40FromGitter<alehander42> ah sorry
07:28:45ZevvAh nevermind, that's nonsense
07:29:21ZevvI think we just need posix/ansi C clock() and maybe clock_gettime(), but that will need all kind of other implementations for other platforms
07:29:32Zevvclock() is a low hanging fruit and is probably ok for basic profiling
07:32:12FromGitter<alehander42> so indeed this was a good question
07:33:52Zevvyes, but what is the *answer*? :)
07:35:02FromGitter<alehander42> the compiler seems to calculate "CompileDate" from getDateStr
07:35:09FromGitter<alehander42> and put this in the final source
07:36:53FromGitter<alehander42> getTime*
07:37:29Zevvyeah but the compiler doesn't do that at compile time right
07:37:43*Zevv scratches his head a bit
07:37:48PMunchIt can't, getDateStr uses "clock_gettime" on Linux
07:38:02Zevvsure, it's available there, but not in the VM
07:38:07Zevvwhich is the point.
07:38:19FromGitter<alehander42> but guys
07:38:21FromGitter<alehander42> the compiler
07:38:23FromGitter<alehander42> runs at runtime
07:38:31FromGitter<alehander42> like
07:38:39FromGitter<alehander42> the compiler code is not CompileTime code
07:39:18Zevvthat's what I ment :)
07:39:27FromGitter<alehander42> we're talking about the nim compiler itself
07:39:32Zevvright :)
07:39:33PMunchAha, CompileDate is a compiler magic..
07:39:37FromGitter<alehander42> yes
07:39:52Zevvso my proposal is to add cpuTime() magic
07:40:24PMunchalehander42, yes but the compiler itself has the time it was compiled in it. So it must at some point get that time when it's compiling itself
07:40:24FromGitter<alehander42> yeah i see what you mean, that one would be able to const COMPILE_TIME = cpuTime() etc
07:40:42FromGitter<alehander42> but that's while its running
07:41:42FromGitter<alehander42> the compiler on its runtime gets getTime(), while its semchecking CompileDate and replaces it in the final AST with a string node
07:41:49Zevvexactly.
07:42:00FromGitter<alehander42> but yeah, a time vm primitive would be better probably
07:42:03Zevvso lets talk about 'vm' or 'native' instead of 'compile time'
07:42:14FromGitter<alehander42> yeah, its very confusing :P
07:42:22FromGitter<alehander42> btw PMunch, so what
07:42:32FromGitter<alehander42> we share a room with the minimalistic langs?
07:43:02FromGitter<alehander42> i guess that means a talk or two for our langs?
07:43:13*navinmistry joined #nim
07:47:28*tdc joined #nim
07:51:17PMunchYeah we went from our proposed half-day room to sharing a full day with the Minimalistic Languages room
07:51:53PMunchLast year they had 17 talks
07:52:20PMunchMost in the 20-30 minute range
07:52:51PMunchhttps://archive.fosdem.org/2019/schedule/track/minimalistic_languages/ <- Last year
07:53:00FromGitter<alehander42> so we can squeeze ~2 i guess
07:53:02FromGitter<alehander42> maybe
07:53:17FromGitter<alehander42> but yeah, its actually a
07:53:38FromGitter<alehander42> new submission form, so maybe there are other langs
07:54:13PMunchI mean it really depends on how many talks that gets proposed
07:54:22FromGitter<alehander42> we can propose 50
07:54:25FromGitter<alehander42> just look at our RFC-s
07:54:49PMunchHaha, be my guest :)
07:55:08PMunchI mean you don't realy have to actually write the talk until after its accepted
07:57:06PMunchOkay, so they wanted a 1 day room, we asked for 0.5 day. Condensing that down to 1 day means 0.75 for "them" and 0.25 for "us" (I really don't like to distinguish, we're supposed to work together after all) means 17 talks/day * 0.25 days = 4.25 talks
07:58:23*livcd quit (Changing host)
07:58:23*livcd joined #nim
08:02:38FromGitter<raydf> Is there any plan for widget based UI macros framework, like Flutter but with Nim instead of Dart?
08:03:43*shomodj joined #nim
08:05:50PMunchraydf, what do you mean by "widget based UI macros framework"?
08:06:03*owl quit (Ping timeout: 240 seconds)
08:13:15*skoude joined #nim
08:15:56*owl joined #nim
08:18:12*asymptotically joined #nim
08:20:02*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:21:37*skoude quit (Ping timeout: 240 seconds)
08:25:20*floppydh joined #nim
08:42:13*ng0 joined #nim
08:50:23FromGitter<nickdex> @alehander42 Thanks for that I didn't knew we can use `or`, kinda like TypeScript. I'll experiment with SomeNumber, sound like a good fit. My first impl was with float, then I started thinking about making it generic, might just create PR with float in end if it doesn't work out
08:52:05*krux02 joined #nim
08:52:41*tdc quit (Read error: Connection reset by peer)
08:54:17*krux02 quit (Read error: Connection reset by peer)
08:56:29FromGitter<alehander42> yeah, the issue is that you can't really create a "generic" sequence in non-generic code
09:06:23*navinmis_ joined #nim
09:07:18*navinmis_ quit (Remote host closed the connection)
09:08:56*tdc joined #nim
09:10:16*navinmistry quit (Ping timeout: 264 seconds)
09:11:44*navinmistry joined #nim
09:14:41skrylar[m]@awr1 i thought rust was interesting, though the compile times were so bad i swear whatever the borrow checker saved me i lost in waiting for compiles :p
09:15:51*asymptotically quit (Quit: Leaving)
09:17:41FromDiscord<Rika> rust has pretty quick compile times now afaik
09:20:27*navinmistry quit (Remote host closed the connection)
09:20:27FromDiscord<Rika> do `ref object`s need `=destroy`s?
09:22:37PMunchAre you using --newruntime?
09:22:58PMunchWith the default garbage collecter you don't need =destroy
09:23:12*krux02 joined #nim
09:25:48livcdRika: really ? where I can read about it ?
09:27:56FromDiscord<mratsim> ref objects have no destroy anyway
09:28:23FromDiscord<mratsim> if you want specific behaviour on ref object end of life you can use finalizers
09:36:41*abm joined #nim
09:42:01FromDiscord<Rika> okay
09:42:52FromDiscord<Rika> uh
09:43:00FromDiscord<Rika> how exactly do i make a finalizer >_<
09:43:11*birdspider joined #nim
09:43:45FromGitter<alehander42> do you need it ?
09:44:06FromGitter<alehander42> i mean, do you want to do something specific when its collected
09:45:18FromDiscord<Rika> yes
09:45:22FromDiscord<Rika> close a dbconn
09:47:14FromGitter<alehander42> iirc you need to write it like https://forum.nim-lang.org/t/1652
09:48:58*Perkol joined #nim
09:49:03*skoude joined #nim
09:49:19FromGitter<alehander42> but i'd use something like context manager template or similar, not sure if finalizers are better fit
09:49:23FromGitter<alehander42> depends on the case
09:53:47*fichtl quit (Ping timeout: 245 seconds)
09:54:14FromDiscord<Rika> it's gonna be an object that's gonna be passed around a lot i guess
09:57:35FromDiscord<Kiloneie> I think that part where youtube detects if you say like and subscribe might hold some weight, but it's impossible to say with a single sample size(#8 surpased #7, which none other video has)
09:58:30FromDiscord<Rika> there are a lot of factors
09:58:57FromDiscord<Kiloneie> Yeah imma wait for a bigger sample to confirm it
09:59:28FromDiscord<Kiloneie> YouTube does do a lot of shady stuff that they don't tell you, you only hear about it from other YouTubers that are already big and actually get news from staff.
10:00:29FromDiscord<djazz> If Manning didnt ship the book (Nim in Action) with FedEx I would have it now.
10:01:44narimiranthere you go again, obsessing about meaningless numbers :D
10:02:02FromDiscord<Kiloneie> Shush.... mute.
10:02:42FromGitter<alehander42> i figured out nim thought most of my single example files are in package
10:02:50FromGitter<alehander42> because i have <myusername>.nimble
10:02:53FromGitter<alehander42> in my home dir
10:02:58FromGitter<alehander42> what am i doing
10:04:44FromDiscord<Rika> you coulda just typed your username in gitter rather than <myusername>
10:06:33FromDiscord<Kiloneie> Is SDL2_gfx a thing made by Vladar4 ?
10:06:33FromDiscord<Kiloneie> Is this the official way of obtaining it trough a dropbox ?: https://github.com/Vladar4/sdl2_nim/blob/master/LINKS.md
10:08:41*navinmistry joined #nim
10:13:16*navinmistry quit (Ping timeout: 264 seconds)
10:13:57FromDiscord<Kiloneie> Where are nimble packages installed to (on windows 10) ? or where can i find this information ?
10:14:03*skoude quit (Ping timeout: 240 seconds)
10:14:42narimiran`nimble path`
10:14:50narimiranhttps://github.com/nim-lang/nimble/#nimble-path
10:15:34narimiranwhy am i reading readme for you?
10:15:50FromDiscord<Kiloneie> Sorry, i must have went over it
10:20:54*solitudesf quit (Ping timeout: 265 seconds)
10:21:17*sedfox quit (Ping timeout: 240 seconds)
10:23:02*sedfox joined #nim
10:23:24FromGitter<alehander42> rika, well not really : if i just say `al` its not obvious this is my user name
10:23:46FromGitter<alehander42> but you're right that actually it doesnt matter if its my user name, <anyident>.nimble seems to lead to the same
10:38:40FromDiscord<Kiloneie> That's a lot of DLLs required for making games with it oO
10:38:43*shomodj joined #nim
10:39:16*shomodj quit (Client Quit)
10:39:18FromDiscord<Kiloneie> Not much different than how most AAA games directories look like actually xD, a clusterfuck of dlls.
10:39:41narimiranwait, are you considering making a game for some of the next videos?
10:39:50*skoude joined #nim
10:39:59narimiranfrom "how to write if statement" to games might be quite a leap :D
10:40:13*shomodj joined #nim
10:40:14FromDiscord<Kiloneie> I am thinking of trying to mixing it
10:41:04FromDiscord<Kiloneie> install git, sdl2, show them a simple sdl2 program, explain as best i can, only the actual code not the army of procedures on the top, then teach loops etc from there... maybe...
10:41:15FromDiscord<Kiloneie> gotta figure out first how difficult this will be
10:47:29FromDiscord<Kiloneie> Probably not for today's video yet, gotta plan what things i gotta teach before SDL2
10:51:45planetis[m]I have a question about custom pragmas. So when the code (type section, proc, etc) is type checked, the pragmas are stripped right? Meaning I can't get them from a typed macro?
10:55:38FromDiscord<Kiloneie> Yeah not today. They gotta learn a bit more first, gotta make it more entertaining though.
10:56:54narimiranagreed about 'more entertaining'. maybe you can now make some small program, based on the stuff you showed already
10:57:24narimiranand then after 5-6 more videos, once again some interesting example using those skills, etc.
10:57:41*skoude quit (Ping timeout: 276 seconds)
11:07:04*ee7[m] quit (Remote host closed the connection)
11:07:08*Miguelngel[m] quit (Remote host closed the connection)
11:07:08*nergal[m] quit (Read error: Connection reset by peer)
11:07:09*zielmicha[m]1 quit (Remote host closed the connection)
11:07:11*isaac[m]1 quit (Read error: Connection reset by peer)
11:07:22*Connor[m] quit (Read error: Connection reset by peer)
11:07:23*BitPuffin quit (Read error: Connection reset by peer)
11:07:24*xomachine[m] quit (Read error: Connection reset by peer)
11:07:28*muxueqz[m] quit (Read error: Connection reset by peer)
11:07:28*pigmej quit (Remote host closed the connection)
11:07:29*GitterIntegratio quit (Read error: Connection reset by peer)
11:07:31*k0mpjut0r quit (Read error: Connection reset by peer)
11:07:37*Demos[m] quit (Read error: Connection reset by peer)
11:07:38*LEdoian[m] quit (Read error: Connection reset by peer)
11:07:38*meff[m] quit (Read error: Connection reset by peer)
11:07:42*planetis[m] quit (Read error: Connection reset by peer)
11:07:42*gh0st[m] quit (Read error: Connection reset by peer)
11:07:42*encryptize[m] quit (Read error: Connection reset by peer)
11:07:42*nc-x[m] quit (Read error: Connection reset by peer)
11:07:43*leorize[m] quit (Remote host closed the connection)
11:07:43*spymasterd[m] quit (Remote host closed the connection)
11:07:44*macsek1911[m] quit (Read error: Connection reset by peer)
11:07:44*lqdev[m] quit (Read error: Connection reset by peer)
11:07:44*narimiran[m] quit (Remote host closed the connection)
11:07:45*skrylar[m] quit (Read error: Connection reset by peer)
11:07:45*jaens[m] quit (Read error: Connection reset by peer)
11:07:45*testgovno[m] quit (Remote host closed the connection)
11:07:45*Kameleon quit (Remote host closed the connection)
11:07:46*yglukhov[m] quit (Write error: Connection reset by peer)
11:07:46*MrAxilus quit (Remote host closed the connection)
11:07:46*TheManiac[m] quit (Remote host closed the connection)
11:07:47*ronny quit (Write error: Connection reset by peer)
11:08:14*daddoo joined #nim
11:10:46FromDiscord<Kiloneie> I was planning a simple calculator
11:14:10FromGitter<alehander42> sounds ok!
11:17:39*Vladar quit (Remote host closed the connection)
11:18:11*planetis[m] joined #nim
11:26:59*Perkol quit (Remote host closed the connection)
11:39:15FromDiscord<Rika> me being dumb again; any docs for how functional programming works on nim?
11:40:42PMunchDepends on what you mean by functional programming
11:40:53PMunchA lot of the concepts are just there in Nim
11:41:35PMunchYou can also use `func` instead of `proc` to create a procedure that is guaranteed to be side-effect free
11:42:00*Demos[m] joined #nim
11:42:00*BitPuffin joined #nim
11:42:00*TheManiac[m] joined #nim
11:42:00*Connor[m] joined #nim
11:42:00*LEdoian[m] joined #nim
11:42:00*k0mpjut0r joined #nim
11:42:00*isaac[m]1 joined #nim
11:42:00*gh0st[m] joined #nim
11:42:00*GitterIntegratio joined #nim
11:42:01*leorize[m] joined #nim
11:42:01*jaens[m] joined #nim
11:42:01*ronny joined #nim
11:42:01*MrAxilus joined #nim
11:42:01*nergal[m] joined #nim
11:42:01*lqdev[m] joined #nim
11:42:02*pigmej joined #nim
11:42:07*macsek1911[m] joined #nim
11:42:07*ee7[m] joined #nim
11:42:07*xomachine[m] joined #nim
11:42:07*narimiran[m] joined #nim
11:42:07*spymasterd[m] joined #nim
11:42:07*yglukhov[m] joined #nim
11:42:07*Miguelngel[m] joined #nim
11:42:07*encryptize[m] joined #nim
11:42:08*muxueqz[m] joined #nim
11:42:08*skrylar[m] joined #nim
11:42:08*testgovno[m] joined #nim
11:42:08*Kameleon joined #nim
11:42:08*zielmicha[m]1 joined #nim
11:42:08*meff[m] joined #nim
11:42:09*nc-x[m] joined #nim
11:42:34PMunchOr something like https://github.com/zero-functional/zero-functional to do zero-cost chaining for a more typical functional workflow
11:44:17FromDiscord<Rika> i just cant seem to figure out how to store a function with a varargs in a variable/object
11:44:26FromDiscord<Rika> am getting `Error: expected: ')', but got: '['`
11:44:36Zevvpastebin your code
11:45:03FromDiscord<Rika> 1 sec
11:46:06FromDiscord<Rika> https://gist.github.com/de-odex/38425fbbbfdb59428e7015abfbb06444 i have NO idea if im doing anything right
11:47:44Zevvyour arguments need names
11:48:21FromDiscord<Rika> what they do?
11:48:22FromDiscord<Rika> damn
11:48:23FromDiscord<Rika> okay
11:49:02PMunchYup, with names it works just as you would expect: https://play.nim-lang.org/#ix=1Pcm
11:49:17Zevvhttp://ix.io/1PcI
11:49:41Zevvha funny I got a race condition from ix.io, "key already exists"
11:49:49Zevvmust have been your paste PMunch
11:49:52FromGitter<alehander42> x, y vs a, b
11:49:59FromGitter<alehander42> the battle of example parameters
11:50:07Zevvhehe
11:50:07FromDiscord<Rika> i use n m
11:50:08PMunchZevv, huh, might be
11:50:11FromGitter<alehander42> i also use a,b
11:50:12FromGitter<alehander42> usually
11:50:36PMuncha, b makes more sense I guess. Then you can go on for longer..
11:50:54ZevvI was just about to leave the Nim community because the bad music taste the other day, but now I found my a,b soulmate I should probably stay
11:51:17ZevvI once picked up the as, bs for lists, dont remeber from what language, but I like that also
11:51:24Zevvfor a in as:
11:51:24shashlick@Araq gorge fails on osx after a few calls - http://ix.io/1NNL
11:51:43PMunchZevv, bad music taste?
11:51:57FromGitter<alehander42> haskell probably
11:52:08ZevvAccording to araq I was the only one critiquing the music of his viral video :)
11:52:45FromGitter<alehander42> you just dont get it zevv
11:53:00Zevvalehander42: well, at least I picked up *something* from haskell then
11:53:43Zevv@Rika: you good now?
11:54:18FromGitter<alehander42> Zevv you can now write "this codebase is inspired by haskell"
11:54:30FromGitter<alehander42> the same way bands write "inspired by u2"
11:54:50PMunchZevv, viral video? How much have I missed :P
11:55:08ZevvPMunch: depends on your music taste I guess
11:55:16Zevvcheck the forum
11:55:49ZevvI must admit Haskell did a good thing opening some parts of my brain I didnt know I had
11:56:11ZevvI later wachted three quarters of the Sussman lisp lectures, that was more of a brain opener though
11:56:17*clyybber joined #nim
11:56:42FromGitter<alehander42> i want to checkout ML/ocaml sometime this year
11:57:12ZevvI'm having a hard time choosing this hears AoC language
11:57:22ZevvNim was 2019's
11:58:38Zevvshould I do rust? I could use some C++ practice but I don't like that. Ocaml is on the list. choices, choices
11:59:24ZevvI'm officially an embedded and systems programmer, and I still have not properly started my rust career. Will that turn out to be a mistake one day?
11:59:50ZevvBUt then again, I got away with ignoring C++ up to now as well, so I'm good :)
12:01:09narimiranZevv: this year is 2019
12:01:19narimiranso nim it is? :D
12:01:40Zevvo right 2019 still, dang
12:01:48Zevv2018 sounds sooo 2017
12:01:53livcdZevv: try with Min
12:02:12Zevvha
12:02:28ZevvI guess I have to make npeg turing complete then
12:04:09narimiranZevv: fwiw, i plan to do this year AoC in Nim + Ocaml
12:04:31narimiranyou should pick it too, so we can compare solutions :)
12:04:38FromGitter<zetashift> Jumped ship from F# to OCaml huh narimiran!?
12:04:42narimiran(i'm an ocaml beginner)
12:04:56narimiranzetashift: yeah, ocaml is easier for me on linux
12:05:37FromGitter<zetashift> even with .NET Core 3?
12:06:18FromGitter<zetashift> (I tried ReasonML but the tooling on windows isn't quite there yet). I really liked the language though
12:06:25FromGitter<zetashift> Kinda miss operator overloading though
12:07:00FromGitter<alehander42> i might also use ocaml
12:07:02FromGitter<alehander42> when is AoC
12:07:19narimirani managed to set up nvim quite nicely for ocaml, so even with .net core 3, i'll stick with ocaml for now
12:07:25narimiranDec 1st – Dec 25th
12:08:10FromGitter<zetashift> The languages don't differ that much anyway so enjoy :D
12:08:37*tklohna quit (Ping timeout: 240 seconds)
12:09:03FromGitter<alehander42> ty
12:09:35FromDiscord<Rika> what does it mean for a proc to be GC-safe
12:09:47narimiranyeah, i miss some things from F# (e.g. either there is no `yield` or i just didn't find it), but otherwise they are quite similar. i like ocaml so far
12:13:08*skoude joined #nim
12:14:28*krux02 quit (Ping timeout: 245 seconds)
12:15:11ZevvRika: pracitally, it should not use global data
12:17:07FromDiscord<Rika> okay, solved the warning i got. the proc in the object has to be gcsafe too
12:17:34*sacredfrog joined #nim
12:18:01*sacredfrog quit (Client Quit)
12:18:51FromDiscord<has1> hi, i think i asked this already
12:18:54*sacredfrog joined #nim
12:19:24FromDiscord<has1> but what would be the equivalent of a go "map" in nim?
12:19:38FromGitter<alehander42> Table
12:19:42ZevvWhat is a "map" in go? :)
12:19:51narimiranhas1: https://nim-lang.github.io/Nim/tables.html
12:20:11Zevvhas1: var t: Table[A, B], where A and B are your Favourite Types
12:20:17Zevvand do 'import tables'
12:22:02FromDiscord<has1> ah great, that seems to be what I want, thanks!
12:25:00FromDiscord<Rika> is there a reason theyre called tables instead of maps or dicts or whatever other name? im just curious, hopefully i aint starting a war
12:25:32FromDiscord<has1> that is an interesting question, and i was looking for an answer to this too
12:25:36FromDiscord<has1> https://en.wikipedia.org/wiki/Hash_table
12:25:56narimiranbecause wikipedia says so? https://en.wikipedia.org/wiki/Hash_table :P
12:26:07narimiranah, you were faster
12:26:16FromDiscord<juan_carlos> map sounds like map of map() of mapping a func to args.
12:26:24FromDiscord<Rika> good points
12:26:42narimiran...and dict sounds like a dick
12:26:58FromDiscord<Rika> how vulgar
12:27:04FromDiscord<Rika> i kid, i kid
12:27:37Zevv'dicts' are often ment for string -> T mapping
12:27:41FromDiscord<Kiloneie> some things are hard to let go after getting them hammered into your head
12:27:47Zevvtables are more generic: every T you can hash, you can use as a key in a Table
12:28:01FromDiscord<Rika> are you referring to me neie?
12:28:43FromDiscord<Kiloneie> well it takes me a few seconds to remember what tables are in other languages. and to all of you
12:28:53FromDiscord<Rika> i dont really have it hammered into my head, because i programmed a tiny bit in lua before, which broke my habit of calling tables dicts before nim
12:29:01FromDiscord<Rika> so thankfully no need to go through that again
12:29:08clyybberAraq: Since you marked https://github.com/nim-lang/Nim/issues/12282 as easy, care to give me a pointer?
12:29:28FromDiscord<Kiloneie> i only used dictionaries in Godot, never used them before, so it shouldn't be too hard to scrap that naming
12:29:46FromDiscord<juan_carlos> culon Nim type on Spanish kinda means fat-ass BTW.
12:31:00FromDiscord<Kiloneie> well it is fat in content
12:31:37FromDiscord<mratsim> is go map a hashtable? in that case "import tables" and use Table, OrderedTable TableRef @has1
12:32:02narimiranIE has entered the building :D
12:32:19FromDiscord<mratsim> oops, discord refresh is slow :/
12:32:55FromDiscord<has1> @mratsim thanks though 🙂
12:33:01*owl quit (Quit: Leaving)
12:33:11FromDiscord<has1> I just wanted to try this out
12:33:33FromDiscord<has1> ah, i was about to post a 6 line code snippet in here
12:34:22FromDiscord<has1> Just before i remembered that everyone is going to freak out from IRC 😄
12:34:31FromDiscord<has1> I really like this though
12:34:31FromDiscord<has1> https://play.nim-lang.org/#ix=1PZf
12:34:59Zevvhas1: we trained you well I see
12:35:48Zevvhas1: surprise: https://play.nim-lang.org/#ix=1PZs
12:36:00FromDiscord<Rika> oh yeah
12:36:03FromDiscord<Rika> that's odd too
12:36:10Zevv:)
12:36:19FromDiscord<Rika> why can there be multiple keys? are strings not hAsH wHeN value?
12:36:21FromDiscord<Rika> oops
12:36:23narimiranmoral of the story: don't use `add`
12:36:25ZevvNim tables are a bit, ehm, 'special'
12:36:35Zevvuse t.data["test"] =
12:36:36narimiranuse `myTable[key] = value`
12:36:41FromDiscord<Rika> *`==` in hash when `==` in value
12:36:45FromDiscord<has1> wait what
12:36:45FromDiscord<has1> LOL
12:37:13lqdev[m]the docs mention this behavior, though
12:37:30FromDiscord<Rika> is accessing a missing key safe or doesnt throw an exception?
12:37:34FromDiscord<has1> thats actually stupid, no offense
12:37:42Zevvhas1: if you ever feel the need to get confused, ask us, we're always here for you
12:37:42FromDiscord<has1> isn't that the entire point about a hash table?
12:37:43lqdev[m]it throws
12:37:53narimiranhas1 there is a reason why it is the way it is
12:38:04narimirani wanted to remove it, but Araq likes this feature
12:38:08FromDiscord<Rika> what's the reason?
12:38:13lqdev[m]a KeyError, to be exact @Rika
12:38:22FromDiscord<has1> yeah, what is the reason??
12:38:31narimiranRika: you can easily try that yourself ;)
12:38:36FromDiscord<Rika> lazy
12:38:40FromDiscord<Rika> 😛
12:38:47FromDiscord<Rika> it's solved now anyway
12:38:58FromDiscord<Rika> now that i think of it it's a dumb question
12:39:18FromDiscord<Rika> anyway why is add the way it is?
12:39:36narimiranso you can have multiple values for the same key. obviously :P
12:40:01narimiranlazy to explain, lol :P
12:40:02FromDiscord<Rika> but you cant access the other one w/o some kinda fuckery can you?
12:40:02FromDiscord<has1> i was going to applaud nim, because in Go adding something to a nil map panics
12:40:03*owl_000 joined #nim
12:40:06FromDiscord<Rika> oof nice
12:40:08FromDiscord<has1> you have to initialize the map first
12:40:30narimiranhas1 yours truly has implemented that, btw ;)
12:40:45FromDiscord<has1> but the fact that the table can have duplicate keys ruins the applause LOL
12:40:59FromDiscord<Rika> OOT: go's interface{} scares me
12:41:00FromDiscord<Rika> anyway
12:41:03PMunchYeah that is really strange..
12:41:18narimiranit is documented (https://nim-lang.github.io/Nim/tables.html#add%2CTableRef[A%2CB]%2CA%2CB) but nobody reads documentation nowadays
12:41:20PMunchIs there a way to get the "surprise" value back?
12:41:30FromDiscord<has1> @Rika you dont have to use it though 🙂
12:41:37PMunchI mean it's fine that it's documented, but why does it even exist?
12:42:02narimiranRika: accessing "some kinda fuckery": https://nim-lang.github.io/Nim/tables.html#allValues.i%2CTable[A%2CB]%2CA
12:42:07FromDiscord<has1> seriously.. this is such unexpected behavior
12:42:09PMunchOh, if you del the key you get the second value..
12:42:27narimiranPMunch: because Araq has some feelings for it and doesn't want to see it gone
12:42:34FromGitter<zetashift> @narimiran it sortof has a `yield` thing: https://ocaml.janestreet.com/ocaml-core/111.28.00/doc/core_kernel/#Sequence
12:42:34FromDiscord<Rika> hey! i read documentation! i was just lazy this one time!
12:42:35PMunchhttps://play.nim-lang.org/#ix=1Q0G
12:42:40narimiranbut if you realized the existence of it just now, i'd say we're ok
12:43:13PMunchI might have a bug somewhere because of it though..
12:43:31narimiranPMunch: did you use `add`? if not, you're fine. if you did: why did you? :D
12:43:33FromDiscord<has1> who is Araq
12:43:38FromDiscord<Rika> nim creater
12:43:40FromDiscord<Rika> creator.
12:43:45narimirancapo di tutti capi
12:43:51FromDiscord<Rika> "the nimmeister" mentioned somewhere above
12:43:56FromDiscord<Kiloneie> The man in the sky
12:44:16PMunchI might've done in a macro. It's generally easier to generate a call than a BracketExpr
12:44:19FromDiscord<has1> but why would he want a table (map) to have duplicate keys?
12:44:22FromDiscord<juan_carlos> For a really scary effect put the keys to empty string.
12:44:23FromDiscord<has1> that is what an array is for
12:44:31PMunchWait, that behaviour is probably just because it's looking through the bucket sequentially. What happens if the table resizes :S
12:44:51FromDiscord<has1> no wait, actually arrays have duplicate values, not duplicate keys
12:45:00PMunchjuan_carlos, wait why is that worse?
12:45:16clyybberWell a hashtable has linked list for collisions, this just appends to them right?
12:45:39narimiranzetashift: thanks, but currently i prefer to use "default ocaml", without jane street additions and modifications. i'm writing just some toy examples, so i prefer to keep it clean and lean, without all the additional syntax one should use with jane street stuff
12:45:42FromDiscord<juan_carlos> I didnt say worse :P
12:46:14FromDiscord<has1> but why does it have to be the set method though?
12:46:27FromDiscord<has1> couldn't it at least be some method like setDuplicate
12:46:29FromDiscord<has1> or something
12:47:14FromDiscord<has1> this api is just going to bite so many noobies from other languages
12:47:29FromDiscord<Rika> didnt bite me, i read the docs!
12:47:32FromDiscord<Rika> i swear!
12:47:37narimiranZevv: look at what you have done!!!
12:47:55FromDiscord<has1> no one reads the docs of every function call they make..
12:48:10FromDiscord<Rika> uh
12:48:20FromDiscord<Rika> hi i seem to be an exception
12:48:33narimiranand "nobody" writes `myTable.add(key, value)`
12:49:09narimirando you write `[]=(mySeq, index, value)`?
12:49:30FromDiscord<has1> @narimiran why wouldn't you?
12:49:41narimiranbecause i'm a sane person
12:50:00PMunchYup, it's not really deterministic: https://play.nim-lang.org/#ix=1Q0U
12:50:13PMunchOr I guess it's deterministic, but it appears arbitrary
12:50:22FromDiscord<has1> most java devs would call the method too btw
12:50:39FromDiscord<has1> @narimiran so much to a constructive argument..
12:50:48FromDiscord<has1> @narimiran so much for a constructive argument..
12:51:05Zevvnarimiran: the fun I have! :)
12:51:34Cadeynarimiran: to quote Q from star trek talking to Twilight Sparkle, "Making sense? Oh, dear Twilight, what fun is there in making sense?"
12:51:38PMunchhas1, I think he meant calling it like that instead of calling it like `mySeq[index]=value`
12:51:45FromDiscord<has1> nim seems to be such a nice language, and then it does silly stuff like this.
12:51:58Cadeyi actually like the syntax flexibility
12:52:01Cadeybut i'm weird
12:52:10PMunchI like it as well :)
12:52:11Zevvnarimiran: used to be a programmer, but these days I mainly get payed to walk in, talk to people and sow confusion. They call that "consultancy", and I'm perfectly fine with that. All I need to do is find the polka-dotted elephant, point at it and send my bills end of the month
12:52:16narimirani'll repeat: i really don't like that we have `add`, i tried persuade Araq into removing it, but that didn't happen before v1.0, and it won't happen now, sorry
12:52:26FromDiscord<Kiloneie> i prefer more flexibility more freedom over THIS IS HOW YOU DO IT AND FUCK YOURSELF otherwise.
12:52:35FromDiscord<juan_carlos> Weirdo is the new Normie.
12:53:04Zevvnarimiran: Maybe we should add a warning the the `add` proc, something like "This can introduce duplicate keys into the table!" in fat letters?
12:53:12PMunchnarimiran, I don't mind `add`, but it should just throw an exception if the key already exists..
12:53:16narimiranand now for the reason why it is here.... are you ready?
12:53:23narimiranhttps://en.wikipedia.org/wiki/Multimap
12:53:24FromDiscord<Kiloneie> that, that should be fixed
12:53:29CadeyPMunch: the real question is if `add` is PUT-like or POST-like
12:53:31FromDiscord<has1> @Kiloneie what do you mean? Do you mean you like duplicate keys in the map (table)? or are you saying you like that you can use m[key] = value or m.set(key, value) ?
12:53:37narimiran"map or associative array abstract data type in which more than one value may be associated with and returned for a given key"
12:54:00Cadeyif add is PUT-like, then it would make sense to throw an exception
12:54:11Cadeyif add is POST-like, then it makes sense for it to replace existing data
12:54:13FromDiscord<Kiloneie> i like different ways of doing anything, but if something makes a duplicate whilst other calls don't, it needs fixing
12:54:22FromDiscord<has1> @PMunch an exception is pretty bad too. It should just overwrite it
12:54:23narimiranPMunch: it is there so you can have the multimap behaviour
12:54:43FromDiscord<Rika> dont you think that should be separated into another object?
12:54:49PMunchCadey, well it's called `add` which shouldn't update something that already exists
12:54:53Zevv(So, did we all decide on the color of the bikeshed, or should we assign a committee to agree on a voting procedure?)
12:54:55Cadeywell
12:54:58Cadeydoes it actually?
12:55:09narimiranit doesn't matter what somebody thinks, jesus christ. it is part of nim v1.0.
12:55:24Cadeyhttps://nim-lang.org/docs/tables.html#add%2CTable%5BA%2CB%5D%2CA%2CB
12:55:26FromDiscord<Rika> okay, im not trying to force anything
12:55:30PMunchZevv, I think we should first decide where to place it
12:55:40FromDiscord<Rika> as long as it's documented i think it's fine
12:55:42Cadeythis claims to put duplicate keys in the table?
12:55:49Cadeywhat does the hexdump of ram say?
12:55:51FromDiscord<has1> what do you guys think about adding a
12:55:51FromDiscord<has1> ".set" method there? That way it should be clearer for a user, so they look up the difference (and you can guess the difference)
12:55:51narimiranCadey: yes, that's what we're discussing
12:55:55PMunchnarimiran, I'm just trying to understand why :P
12:56:12*narimiran flips table
12:56:16Zevvhahaha
12:56:17FromDiscord<Rika> i mean it IS called add
12:56:38narimiran(and yes, pun was intended)
12:56:47FromGitter<zetashift> @narimiran yea I get that, but I was curious myself cause I used recursion for a lot of things instead of `yield`, but still I found myself quickly going through this: https://github.com/c-cube/ocaml-containers instead of using the stdlib.
12:56:55FromDiscord<Rika> i have no idea how to fix this... https://play.nim-lang.org/#ix=1Q2O
12:57:04*PMunch flips map
12:57:29*PMunch discovers riddle to find X on map that marks treasure
12:57:30CadeyRika: s/{}/@[]/g
12:57:41Cadeyoh wait
12:57:44*PMunch grabs a shovel and run for the hills
12:57:45Cadeythat's a seq not a set
12:57:46FromDiscord<Rika> that looks like regex
12:57:47FromDiscord<juan_carlos> PUT-like?, Wait Table has a REST API? :P
12:57:51PMunchUhm sorry, where were we?
12:58:04Cadeyjuan_carlos: it PUTs all of the table problems to REST
12:59:41PMunchRika: https://play.nim-lang.org/#ix=1Q4r
13:00:12FromDiscord<Rika> is there a reason nim cannot compile it as is?
13:00:30PMunchEssentially the array just needs to know that the set is indeed a set[Style] (once the first element is known it will automatically know the others)
13:00:55narimiranright-hand side of `=` is not inferred from left-hand side
13:00:55PMunchWell, the reason is that the right hand side is evaluated before it's assigned to the left hand side
13:01:02PMunchYeah
13:01:12FromDiscord<Rika> thanks
13:01:29PMunchI've asked about this before, not sure if I even got a clear answer as to why it can't do it
13:01:30FromDiscord<SrMordred> reading the conversations now about tables and add.
13:01:30FromDiscord<SrMordred> being able to duplicate values on the table means for me that this is not the best implementation of table that i could be using.
13:01:37PMunchMight just be difficult..
13:01:46FromDiscord<Rika> oh no we're back to the table discussion
13:01:49narimirani thought we moved on from that pile of shit
13:01:51FromDiscord<SrMordred> sorry xD
13:01:55FromDiscord<Rika> let's not
13:02:17clyybberIt makes sense. It is called add, so its gonna add.
13:02:30*Zevv grins
13:02:32clyybberIf it were called set I'd agree. But it isn't
13:02:34PMunch`import tables except add` problem solved
13:02:46narimiranSrMordred i would be glad if we had "the best implementation" of hashtables in some nimble package. i'm not being ironic
13:03:05FromDiscord<SrMordred> it´s just that this also caught me on surprise
13:03:34narimiransomebody could take that as their hacktoberfest task.... https://forum.nim-lang.org/t/5263
13:04:37*go|dfish quit (Ping timeout: 240 seconds)
13:04:42FromDiscord<SrMordred> @narimiran i´m far from a hash table specialist, but i can try something for fun 😛
13:04:50narimiranbtw, there's this: https://github.com/LemonBoy/compactdict but "Same API as stdlib's Table" means there's `add` too
13:06:22narimiranzetashift thanks for the link for ocaml-containers
13:07:29PMunchnarimiran, why is that repo archived?
13:07:47clyybberIt's unmaintained and you should probably use my fork: https://github.com/Clyybber/compactdict
13:08:01clyybberSince my fork will replace LemonBoy's repo in important_packages
13:08:11narimiranPMunch: because lemonboy got upset, stopped working with nim, and is now using zig
13:08:22Zevvoh is he?
13:08:24PMunchOh, that's unfortunate..
13:08:43PMunchhttps://github.com/LemonBoy/compactdict/blob/master/src/compactdict.nim#L161-L162 <- By the way, it seems like it doesn't have the stdlib `add`
13:08:45Zevvwas it a personal thing?
13:08:58narimiranclyybber: oh, nice! ping me when it is ready, and also modify nimble's packages.json to poing to your version
13:09:26*skoude quit (Ping timeout: 252 seconds)
13:09:41narimiranZevv: yeah, he couldn't stand Table.add, and he left! :P
13:09:51FromDiscord<SrMordred> lol
13:09:51narimiranPMunch: ah, true
13:09:57clyybbernarimiran: I'm doing that in the csize -> uint PR. I'm still waiting for nimgame to merge my PR and then I'll push my changes to minize CI usage
13:10:03ZevvYeah, some leave beacuse of the tables, some leave because of the terrible music taste
13:10:35clyybberWow, it just occured to me that leaves are called leaves because they leave the tree
13:10:37clyybberduh
13:10:51FromDiscord<turbosoggy> How disable gc
13:11:06Zevvturbosoggy --gc:none
13:11:07clyybber--gc:none
13:11:19clyybberOr if you don't want leaks: --newruntime
13:11:23*rockcavera joined #nim
13:11:35FromDiscord<turbosoggy> Will this prevent me from doing gc allocs
13:11:36planetis[m]does anyone know if hasCustomPragma is broken with typed macros?
13:12:05ZevvWith --newruntime you can at least use *some* of the stdlib
13:15:16*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:15:36FromDiscord<exelotl> --gc:none is good for embedded, but you can't use strings, seqs, tables etc.
13:16:28planetis[m]am i doing something wrong: https://play.nim-lang.org/#ix=1Qi7
13:16:46clyybberZevv: With --gc:none you can use all of the stdlib :P
13:17:06clyybberFromDiscord: Can you not?
13:17:13clyybberI thought you could and it would just leak
13:17:21clyybberNevermind then :)
13:17:42*clyybber quit (Quit: WeeChat 2.6)
13:19:04PMunchWell yes, you can still use it
13:19:07PMunchBut it will leak
13:19:15PMunchBecause there is no-one around to pick up garbage..
13:19:47FromDiscord<exelotl> I've seen warnings about allocation occurring a couple of times, so it seems like Nim at least knows when they happen
13:19:52Zevvhm true, so you're better off then with --newruntime, because then you still can't use async or json :)
13:21:12FromDiscord<exelotl> In my case I only want static allocation so gc:none is perfect for me, but yeah I guess newruntime is usually the better choice for most people
13:22:35PMunchplanetis[m], yeah that won't work
13:29:24*asymptotically joined #nim
13:33:27PMunchplanetis[m], you can just "borrow" the logic of hasCustomPragma: https://play.nim-lang.org/#ix=1Qix
13:35:50*PrimHelios joined #nim
13:37:21PMunchplanetis[m], or more easily with: https://play.nim-lang.org/#ix=1Qkr
13:37:48PMunchEssentially what you were checking was if the NimNode that held the `Ab` sym had a custom pragma, which it doesn't.
13:38:52PMunchThis will create the call `hasCustomPragma(Ab, pin)` and then tell Nim to get the AST that would be returned by that call, which is a nnkSym that is either "true" or "false"
13:44:09*a_b_m joined #nim
13:45:39*PrimHelios quit (Quit: Leaving)
13:46:25FromGitter<rdlsf-omg> @PMunch An example of flutter: ⏎ https://flutter.dev/docs/development/ui/widgets-intro ⏎ ⏎ ```https://flutter.dev``` [https://gitter.im/nim-lang/Nim?at=5d94aa317fe6a605d16ba798]
13:47:22planetis[m]thank you PMunch!
13:47:37*abm quit (Ping timeout: 240 seconds)
13:48:46planetis[m]I think hasCustomPragma should have been a proc operating with NimNodes not a macro
13:51:06*shomodj joined #nim
13:51:35narimiranzetashift: i gave `containers` a quick try, and it seems like a great addition to my workflow, just what i needed! thank you!
13:53:33PMunchplanetis[m], yeah the way it works now is a bit weird... It should at least offer both
13:54:06*PrimHelios joined #nim
13:55:01PMunchrdlsf-omg, hmm that looks interesting. Not entirely sure what sets it apart from a regular GUI toolkit with widgets though in your opinion
13:55:23shashlick@narimiran - any suggestions on https://irclogs.nim-lang.org/01-10-2019.html#23:29:46
13:56:19narimiranshashlick: no idea, i'm on linux. sorry
13:56:31PMunchI mean you can use nimx on mobile, it uses SDL as it's back-end https://github.com/yglukhov/nimx
13:57:02PMunchIt doesn't have it's own DSL ATM, but you should be able to create one fairly easily if it's consistent in how it works
13:57:33shashlickanyone on osx able to debug why return value is -1 for gorgeEx after a few tries
13:57:53shashlickbroken since 0.19.6 at the very least
13:58:23*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:58:50PMunchAh, apparently it has a layout DSL: https://github.com/yglukhov/nimx/blob/master/doc/layout-dsl.md
13:59:17*shomodj joined #nim
14:00:24*shomodj quit (Client Quit)
14:01:15FromGitter<zetashift> @narimiran thank the dudes who maintains the project, but glad you enjoy it!
14:05:53livcdI need a guide how to use simd for md5 hashing in Nim :X
14:06:00livcdAnyone here worked on something like that ?
14:09:19narimiranlivcd: my wild guess would be @mratsim
14:12:03shashlickhttps://github.com/nim-lang/Nim/issues/12337
14:12:28shashlickhow do you debug an OSError / IOError condition to see what raises it
14:13:22*PMunch quit (Remote host closed the connection)
14:14:03FromDiscord<kodkuce> it sux when you dont know math, how do they expect me to do raindrops exercise
14:15:43*PrimHelios quit (Ping timeout: 250 seconds)
14:19:23FromDiscord<Kiloneie> google math
14:20:36FromDiscord<Rika> odd... using terminal, if you set bg as bgDefault setting fg doesnt seem to work
14:21:26FromDiscord<Kiloneie> theres a few things that didnt work for me either in terminal module
14:22:05FromDiscord<Rika> it's outdated-ish? it's a hard to test module i guess
14:22:14FromDiscord<juan_carlos> module has a reset too
14:22:23FromDiscord<juan_carlos> It seems to work to reset
14:30:10shashlickmy issue is due to too many open files - seems like VM is not closing files or something
14:30:19*ripspin joined #nim
14:32:20*traviss quit (Read error: Connection reset by peer)
14:33:53*nsf quit (Quit: WeeChat 2.5)
14:37:34*theelous3 joined #nim
14:38:59Zevvshashlick: link?
14:39:08Zevvoh up there ^
14:41:30Zevvindeed, gorge opens a pipe but does not close
14:49:07Zevvp.close() missing in gorgeimpl.nim?
14:49:16disrupteki tol' you george is a curious monkey.
14:53:26Zevvthe name alone is abhorrent
14:53:59disruptekdon't be rude.
14:54:05disrupteki have two kids named `alone`.
14:56:28Zevvshashlick: https://github.com/nim-lang/Nim/pull/12339
14:57:00*go|dfish joined #nim
14:57:25*Trustable joined #nim
14:58:29*a_b_m quit (Quit: Leaving)
14:58:53FromGitter<rdlsf-omg> @PMunch thx, nice for nimx
14:59:15FromGitter<rdlsf-omg> i'll see if i can expand and replicate some of the flutter features
15:02:09AraqZevv: I lost your Z3 gist
15:02:18Araqcan you send it again please?
15:02:41Araqwant to play with it a bit
15:08:24Zevvgist? its a nimble
15:08:52Zevvhttps://github.com/zevv/nimz3
15:09:31FromGitter<alehander42> we have a monkey and a cat with a hat now
15:09:47Zevvwho's the monkey?
15:10:16FromGitter<alehander42> that's just not respectful
15:10:18FromGitter<alehander42> to george
15:10:31Zevvgeorge leaks
15:10:41disruptekyou've been known to leak, yourself.
15:10:45disruptekdon't deny it.
15:10:54FromGitter<alehander42> we all leak from time to time
15:11:02Zevvif you cant even clean up after yourself, there is no place for you in the stdlib
15:11:23disruptekhe is but one of many such youngsters in the stdlib.
15:11:26FromGitter<alehander42> ok, doctor memory
15:11:42Zevvbut to be honest, why do we not have proper language constructs to do this for us?
15:11:56FromGitter<alehander42> i just want to write
15:11:58FromGitter<alehander42> {.dontLeak.}
15:12:05FromGitter<alehander42> on the top of my file and be done with it man
15:12:11disrupteklike what? context managers?
15:12:29FromGitter<alehander42> we have proper language destructs tho
15:12:29ZevvI want execProcess to just close when its going away. Easy RAII with a friendly syntax
15:12:47Zevvfinally?
15:12:53disruptekyes.
15:13:04*daddoo quit (Quit: Leaving)
15:13:12disruptekwhen it works. 😉
15:13:13FromGitter<alehander42> actually, isnt exactly that what destructors are supposed to do
15:13:21Zevvit is. but GC time is too late
15:13:23FromGitter<alehander42> i was making puns
15:13:30ZevvI know :)
15:13:31FromGitter<alehander42> didnt intend to make a valid argument
15:13:34FromGitter<alehander42> sorry
15:14:21ZevvOr is it that I just dont know how to do this?
15:14:35FromGitter<alehander42> so you want destructors tied to the scope?
15:14:42Zevvto lifetime
15:14:52disruptekc'mon; you can't use destructors because that isn't the semantic we're after.
15:15:01Zevvright
15:15:15disruptekfinally or defer.
15:15:19FromGitter<alehander42> but lifetime is often tied to scope
15:15:29FromGitter<alehander42> i think finally and defer are not good
15:15:30disrupteki decide what's tied to what; i'm the programmer.
15:15:35FromGitter<alehander42> because you have to think of them
15:15:41disruptekyes.
15:15:46disruptekit's a mad mad mad mad mad world.
15:15:52FromGitter<alehander42> thinking man, you dont want to do that
15:15:53FromGitter<alehander42> too much
15:15:54Zevvyeah but what if the opened thingy goes living somewhere else for some time
15:16:04disruptekthat's why i need to be in charge.
15:16:18Zevvits of course related to all the new stuff, newruntime, destructors, finalizers
15:16:32FromGitter<alehander42> well, you cant just move everywhere
15:16:34disrupteki really don't think so.
15:16:40FromGitter<alehander42> we need stricter emmigration laws
15:16:46Zevvbut i got this guy at my desk going "weeelll, i have my shared_ptr, what do you have"
15:16:55Zevvand I go "uuuhhh"
15:17:20FromGitter<alehander42> that's not a bad name for a pointer as well
15:20:06*floppydh quit (Quit: WeeChat 2.6)
15:23:07FromGitter<awr1> hello
15:25:33FromGitter<awr1> @livcd i don't know of any SIMD approach to MD5 (but i would be hardly surprised if it exists)
15:25:50FromGitter<awr1> i do know that newer x86 CPUs has instructions for computing SHA
15:25:53FromGitter<awr1> SHA-1
15:26:00FromGitter<awr1> 1) SHA-256
15:26:06FromGitter<awr1> https://en.wikipedia.org/wiki/Intel_SHA_extensions
15:28:24*Vladar joined #nim
15:34:04*shomodj joined #nim
15:41:47*zyklon quit (Quit: Konversation terminated!)
15:42:00*zyklon joined #nim
15:45:50FromDiscord<mratsim> It's not newer CPU, it's Atom Goldmont and future Cannon-lake only
15:46:03FromDiscord<mratsim> I have the latest intel CPU and no SHA :/
15:46:56FromDiscord<Kiloneie> isn't Atom discontinued because ARM cpus wreck it because of power usage ?
15:52:59*sealmove joined #nim
15:54:00AraqZevv: we got destructors and moves, just like C++ does, a shared_ptr is about 50 lines of code
15:54:12Araqexcept that the stdlib doesn't offer it yet
15:55:52*owl_000 quit (Ping timeout: 245 seconds)
15:56:22FromDiscord<has1> hi, how do I do this with nim?
15:56:23FromDiscord<has1> https://play.nim-lang.org/#ix=1R4x
15:57:22FromDiscord<has1> i want the method "add" to only allow a key of type K and a value of type V which were previously used in the table declaration
16:03:44FromDiscord<Rika> how do i make an "only keyword argument" proc (like python's (arg, *, keyword_only)
16:06:47lqdev[m]@has1 your proc is missing the [K, V] generic parameters
16:08:04lqdev[m]https://play.nim-lang.org/#ix=1R63
16:08:11lqdev[m]though, I'm not sure why this errors
16:08:14*solitudesf joined #nim
16:15:09FromDiscord<Rika> @has1 https://play.nim-lang.org/#ix=1R9F
16:16:00FromDiscord<Rika> had to kinda simplify it (removed speak because me dumb, it being there hurt my brain juice)
16:19:43*hades joined #nim
16:20:05*hades is now known as Guest36309
16:20:29*Guest36309 is now known as fichtl
16:21:29*krux02 joined #nim
16:24:15sealmoveHey guys, in streams module there is FileStream and StringStream. If I need to make a stream out of a seq (which is saved in a variable), I have to implement it? Or is there a common way to do this?
16:24:58disruptekwhat's in the seq?
16:25:17*LargeEpsilon quit (Ping timeout: 240 seconds)
16:25:23sealmovejust data
16:25:33sealmoveah I mean, it's a seq[byte], sorry
16:26:01disruptekjoin it into a string. i thought you had something arbitrary, in which case you want, like, channels or something.
16:27:31sealmoveso seq[byte] -> string -> StringStream?
16:27:39disrupteksure.
16:27:45sealmovegreat, thzx
16:31:49*nsf joined #nim
16:38:07FromDiscord<has1> @Rika so i need this init function there?
16:38:52FromDiscord<mratsim> @sealmove there is a ByteStream normally
16:39:04sealmovewhere?
16:39:12FromDiscord<Rika> no afaik, you can just copy paste the thing there (that would mean writing `Person[string, string](data: newTable[string, string]())` though which is looooooong af)
16:40:31FromDiscord<Rika> hey, im prolly just as noob as you, but i think that's right. maybe verify with someone else if you dont trust me xd
16:40:41FromDiscord<mratsim> oh, seems like it wasn't merged: https://github.com/nim-lang/Nim/pull/7481
16:41:27FromDiscord<has1> @Rika so i can access the data variable inside the object and use its api correctly
16:41:32FromDiscord<mratsim> you can use cast[string](yourSeqByte) or use faststreams: https://github.com/status-im/nim-faststreams
16:41:36FromDiscord<has1> but i cant wrap it in a method??
16:41:45FromDiscord<Rika> what?
16:42:11FromDiscord<Rika> sorry, i dont understand what you mean
16:42:23FromDiscord<Rika> the add method works if you look again
16:43:39sealmovemratsim: is cast[string](yourSeqByte) better than join(yourSeqByte)?
16:44:08ZevvIs it possible for a string to still be nillable? I have a callback function that I'd like to return a string, but I need to see the difference between no result/return or en empty result/return
16:44:24FromDiscord<Rika> is there a library for vector math in nim?
16:44:40FromDiscord<Rika> roughly analogous to python's numpy?
16:45:19Zevvyes there is indeed
16:45:47ZevvArraymancer: https://github.com/mratsim/Arraymancer
16:45:54FromDiscord<has1> @Rika no it doesnt work
16:45:55FromDiscord<has1> https://play.nim-lang.org/#ix=1Rlo
16:46:06FromDiscord<has1> you are using a TableRef instead of a Table too
16:46:16FromDiscord<Rika> must it use a Table?
16:46:24FromDiscord<Rika> you're not echoing the data again after the add
16:46:37sealmoveZevv: Option[string]?
16:47:04Zevvhm but then the callback needs to return some(""), right?
16:47:08FromDiscord<has1> @Rika i am echoing the object
16:47:16FromDiscord<has1> and tableref seems to be a bad idea
16:47:18FromDiscord<Rika> before the add function
16:47:18FromDiscord<has1> "SIGSEGV: Illegal storage access. (Attempt to read from nil?)"
16:47:25FromDiscord<Rika> what did you do?
16:47:26sealmoveZevv: yes
16:47:32Zevvbah :(
16:47:43FromDiscord<has1> The code is above
16:47:47FromDiscord<Rika> you didnt "initialize" the table
16:47:57ZevvI'll provide a closure proc instead that the callback can call...
16:48:05FromDiscord<has1> @Rika Yes, that is the point
16:48:32FromDiscord<has1> is there no way to make the add method work?
16:48:36FromDiscord<Rika> let me see if i can use table
16:48:43FromDiscord<Rika> using table, set has to be variable
16:49:55FromDiscord<has1> i mean look at this
16:49:56FromDiscord<has1> t.data["test"] = "new"
16:50:09FromDiscord<has1> i can directly access the data (which is a table)
16:50:18FromDiscord<has1> all i want to do now is wrap this in a method
16:51:42FromDiscord<Rika> dumbass i am
16:51:45FromDiscord<Rika> https://play.nim-lang.org/#ix=1Rm6
16:51:48FromDiscord<has1> This is more of a generics question in general for me, not a table question
16:51:56FromDiscord<Rika> oops
16:51:59FromDiscord<Rika> wrong link
16:52:00FromDiscord<Rika> lmao
16:52:23FromDiscord<Rika> https://play.nim-lang.org/#ix=1Rm9 @has1 this seems to work
16:53:30FromDiscord<has1> yes i just tried that after seeing the var thing, this is exactly what i was looking for it seems, thanks!
16:53:39*lritter joined #nim
16:54:45Zevvso to make sure: there is no way to make a string still nillable?
16:55:00*LargeEpsilon joined #nim
16:55:07Zevvwith some pragma magic or whatever
16:56:19disrupteki would love it if the PRs to the nimble package repo included the description and tags in the generated comments so we can keep track of new software in email or github notifications.
16:56:41disruptekZevv: use a `ref string`.
16:56:50disruptekor a cstring.
16:57:44disruptekhaving the url to the package homepage would be pretty handy, too.
16:57:53Zevvah cstring, good trick, thanks!
17:00:50*nif quit (Quit: ...)
17:01:01*nif joined #nim
17:10:16disruptekalehander42 are you still the resident expert on osproc?
17:11:22sealmovethough you should probably try to work with Nim strings. there is a reason they can't be nillable
17:11:40Cadeysealmove: do a ref string
17:11:53Cadeyor Option[string]
17:12:01CadeyOption[string] is probably better
17:14:05FromGitter<kdheepak> Hi all, if I have a `let value = "1 2 3 4 5 6`, and want to return `@[1, 2, 3, 4, 5, 6]`, what would be the nim idiomatic way to do this? `value.split()` returns `""` elements in the sequence.
17:15:41FromGitter<kdheepak> In Python the split does what I expect. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d94db3deb1eff63d664c1f0]
17:16:17FromDiscord<Generic> the thing is that Nim is statically typed
17:16:42FromDiscord<Generic> in python there's not really a difference (I don't know it that well) between a text string
17:16:46FromDiscord<Generic> containing a number
17:16:50FromDiscord<Generic> and number itself
17:17:17FromDiscord<Generic> or atleast the conversion is often done implicitly
17:17:20FromGitter<kdheepak> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d94dba0086a72719ea1d4e6]
17:19:56shashlick@Zevv thanks for that PR!
17:20:11shashlickNow to figure out how to support all the older releases of Nim
17:20:12FromDiscord<Generic> https://gist.github.com/RSDuck/f2d4d6c0fee371314cbd3de2e957e77c
17:20:23FromDiscord<Generic> @kdheepak
17:20:43FromDiscord<Generic> that's how it's done in Nim, though of course it depends on what you're trying to archive
17:20:54*Trustable quit (Remote host closed the connection)
17:21:11FromDiscord<Generic> in this example we're parsing ints, but we would have to use parseFloat for floats
17:21:25FromGitter<kdheepak> Ah
17:21:39FromDiscord<Generic> it also fails if one of the objects is not something parseInt can parse
17:21:46FromGitter<kdheepak> What is value contains abitrary strings
17:22:01*birdspider quit (Remote host closed the connection)
17:22:04FromDiscord<Generic> parseInt throws a ValueError
17:22:14FromGitter<kdheepak> ```value = " as=sfa ssee ess 1 2.0-1 s"```
17:22:44*drewr quit (Quit: ERC (IRC client for Emacs 26.3))
17:22:51FromGitter<kdheepak> Also, what is `it` in your gist.
17:22:56FromDiscord<Generic> https://play.nim-lang.org/#ix=1RGp
17:23:43FromDiscord<Generic> mapIt is a template, defined in sequtils
17:24:18FromDiscord<Generic> it basically generates this code
17:24:36FromDiscord<Generic> for it in mitems(yourseq):
17:24:54FromDiscord<Generic> then it inserts the code passed to mapIt
17:25:18FromDiscord<Generic> and makes sure that it from the for loop is accesible for the inserted code
17:27:13FromDiscord<Generic> https://nim-lang.org/docs/sequtils.html#mapIt.t%2Ctyped%2Cuntyped
17:28:44*drewr joined #nim
17:30:05FromDiscord<Generic> this is for example how you can only take those items which are parseable numbers https://play.nim-lang.org/#ix=1RGC
17:33:04*LargeEpsilon quit (Ping timeout: 264 seconds)
17:36:08yumaikasIs there a reason I shouldn't use the standard library tables? Or just API concerns?
17:42:59*dddddd joined #nim
17:45:03*Vladar quit (Remote host closed the connection)
17:45:17FromDiscord<kodkuce> raindrops finished, factorials are easy if you know what they are, anyway i switched to practice mode cuz mentors lazy so now i lost track what should i do next, and for some retarded reason cant switch back, anyone have screenshot of exercism track
17:45:22FromGitter<xmonader> is there a reliable connection pool library?
17:45:51shashlick@dom96 - PRs when you get a chance?
17:46:08FromGitter<xmonader> I'd like to extend some libraries with a connection pool and it's not really the easiest thing to get `correctly`
17:51:19FromDiscord<Kiloneie> main exercises on exercism are not maintained anymore, even after a week my program wasn't checked. Do the side ones and check them again the unitest file provided.
17:51:38*daddoo joined #nim
17:56:56shashlickdoes `ulimit -n 1024` work on osx?
17:57:12Cadeylet's find out
17:57:25Cadeyyes
17:57:31Cadeydefault is 4864
17:57:41shashlickreally?
17:57:44shashlicknewer osx?
17:57:49Cadey10.14
17:58:15shashlickwonder what it is on travis
17:58:34FromDiscord<kodkuce> i just wanted to fallow diagram, i switched to practice mode so all unclocked, how to cast int to string i tryed $ didnet work or i retarded
17:58:35shashlicktravis is 10.13
17:59:13*NimBot joined #nim
18:00:02lqdev[m]@kodkuce what error?
18:02:34FromDiscord<kodkuce> for n in 0..$input.len(): << meybe cuz am trying to do it like this
18:03:38FromDiscord<kodkuce> am tyring to do for each char in number
18:03:56FromDiscord<kodkuce> 256 - for 2, for 5, for 6
18:04:40lqdev[m]`for c in $input`
18:04:47lqdev[m]it's that simple
18:05:27lqdev[m]also, operators other than `@` apply to the whole expression, so `$input.len` is `$(input.len)` not `($input).len`
18:05:28FromDiscord<kodkuce> for n in 0..input.intToStr.len(): << hmm i solve it like this
18:05:53FromDiscord<kodkuce> for c in $input should give me chars and i wnat ints
18:06:05lqdev[m]aah, I get what you mean
18:06:34lqdev[m]you can create a variable `digit` inside the loop's body with the value `parseInt(c)`
18:07:09FromDiscord<kodkuce> that can work too but this way i have no parses
18:07:22FromDiscord<kodkuce> multiple times at least 🙂
18:10:18lqdev[m]I don't think what you're trying to achieve is possible, but I remember there was a simple formula for extracting a digit from a number
18:10:21*tklohna joined #nim
18:10:24lqdev[m]give me a sec
18:13:03daddooif you know it's a digit, subtract 48 from the character's ASCII value if you're working in ASCII
18:13:04*tklohna quit (Read error: Connection reset by peer)
18:13:20lqdev[m]try this: `trunc(x mod 10 ^ n / 10 ^ (n - 1))` where `x` is your input number, where `n` is the decimal place. 1 is ones, 2 is tens, 3 is hundreds, etc.
18:13:55FromDiscord<kodkuce> lol worst thing is i just figure out i dont need this, i was solwing quest wrong
18:14:45FromDiscord<kodkuce> or not hmm need to think, birds have small brains i guess xD
18:17:32FromDiscord<Lunar> I just dual booted Linux Mint onto my Windows laptop. I got impatient for it to restart (everything was done), and unplugged the USB. In 20 minutes, the BIOS completely drained my 80% battery trying to recover the lost stuff
18:17:45FromDiscord<Lunar> Note to self, have patience
18:17:46FromDiscord<kodkuce> wtf
18:17:55FromDiscord<Lunar> Yea
18:18:16FromDiscord<kodkuce> solution = delete Windows it sux
18:18:18FromDiscord<Lunar> It was spewing stuff into console, 10 messages a second
18:18:29FromDiscord<Lunar> Lmao why do you think I dual booted Linux
18:18:39*asymptotically quit (Quit: Leaving)
18:18:48FromDiscord<Lunar> In reality, I'd like to have all three OS's on my laptop
18:18:56FromDiscord<kodkuce> why?
18:18:56FromDiscord<Lunar> So I can run whatever I need
18:19:32FromDiscord<kodkuce> hmm, only thing i miss on linux is legit Solidworks, there is 1 online Onshape or that SimensNX(expensive as f)
18:20:00FromDiscord<Lunar> I have no clue what any of that is. I program, not usually deal with hardware 😂
18:20:27FromDiscord<Lunar> I have no clue what any of that is. I program, not usually deal with BIOS 😂
18:21:58FromDiscord<kodkuce> Solidworks= Parametrict modeling, like for creating a tehnical 3d model
18:22:20FromDiscord<kodkuce> you program in c# thats why need Windows or what?
18:23:46FromDiscord<Kiloneie> What is the main difference between iteration of a containter/iterable withing a for loop, between iteration of every element by specifiy the container and using container.low .. container.high ?
18:23:46FromDiscord<Kiloneie> I know there are difference, and i have seem them, but i honestly forgot...
18:23:47FromDiscord<kodkuce> i spined a w10 in virtualbox for a job some stupit SQL app for windows , but i resigned after 2 days was uber boring work
18:25:38FromDiscord<kodkuce> hmm , i think for element in someseq it behaves like foreach in c# or some other lang, if you do for i in 0..seq.len() then you get index number too if you need it
18:26:05FromDiscord<Kiloneie> oh yeah, index is unavailable in the first one
18:27:48FromDiscord<kodkuce> whats operator for sqare num , example i want 3 on 3 = 3x3x3 = 27
18:28:18FromDiscord<Kiloneie> maybe ^
18:28:24FromDiscord<Kiloneie> or power idk
18:28:54FromDiscord<Kiloneie> that is usually how it's done in other languages, haven't done it in Nim yet.
18:29:57FromDiscord<kodkuce> https://nim-lang.org/docs/manual.html#lexical-analysis-operators , here they listed but i duno to read between the lines 🙂
18:31:20*ripspin quit (Remote host closed the connection)
18:31:39FromGitter<alehander42> disruptek
18:31:42FromGitter<alehander42> am i an expert
18:31:47FromGitter<alehander42> i just ctrl+p osproc.nim
18:31:49FromGitter<alehander42> all the time
18:31:51FromGitter<alehander42> in my editor
18:31:52FromGitter<alehander42> :P
18:32:51disruptekwhat's ctrl+p?
18:33:00FromGitter<alehander42> jump to file
18:33:03FromGitter<alehander42> with fuzzy search
18:33:20disruptekwell, i know you were trying to capture stdout and stderr, iirc.
18:33:27FromGitter<alehander42> oh yeah
18:33:29FromDiscord<Kiloneie> try math module
18:33:31FromGitter<zetashift> @Kiloneie try https://nim-lang.org/docs/math.html#pow%2Cfloat32%2Cfloat32
18:33:37FromGitter<alehander42> iirc it needed a PR to add a difference
18:33:43FromGitter<alehander42> but i think @timotheecour
18:33:47FromGitter<alehander42> had a similar plan?
18:33:49FromDiscord<Kiloneie> lol i beat you to it
18:33:58FromGitter<zetashift> rip
18:34:20FromDiscord<Kiloneie> don't have time right now, was too lazy today, terrible weather and all. Ahh still haven't started recording, this video is gonna be long as fuck D:
18:34:22disrupteki dunno. i think i have to just use selectors on the handles so i don't block.
18:34:38disruptekdon't wanna wait around for a fix or have to contest it in a pr.
18:34:48FromDiscord<kodkuce> in math there is sqrt but no square or square on
18:35:54FromDiscord<Kiloneie> pow()
18:36:51FromDiscord<kodkuce> ty
18:39:17FromDiscord<kodkuce> hmm do i really have to convert ints to floats to use pow, shoudent pow eat ints too?
18:40:00FromDiscord<Kiloneie> it should...
18:40:02FromDiscord<Kiloneie> idk
18:41:09FromDiscord<kodkuce> am just complaining to masters or whoewer wrote math 🙂
18:41:51FromDiscord<kodkuce> lol i am blind it even says to compute betwin integers use ^proc
18:43:14FromDiscord<kodkuce> hmm
18:45:08rayman22201ping @timotheecour. My friend, can you address some of my questions on github when you get the chance? thank you :-) https://github.com/nim-lang/Nim/issues/12330
18:45:26*solitudesf- joined #nim
18:46:19*solitudesf- quit (Remote host closed the connection)
18:46:43*solitudesf- joined #nim
18:47:47*solitudesf quit (Ping timeout: 268 seconds)
18:48:19*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:54:09*shomodj joined #nim
18:54:13*shomodj quit (Read error: Connection reset by peer)
19:03:39kevinsjobergI just bought Nim in Action since I want to explore the language a bit. Any recommended editor? I'm open for anything.
19:04:08Araqvscode
19:06:04kevinsjobergAraq: Thanks, I'll try that out.
19:16:35narimirankevinsjoberg: neovim + nim.nvim plugin
19:21:45*shomodj joined #nim
19:25:28*Ven`` joined #nim
19:31:42FromDiscord<Kiloneie> Visual Studio Code
19:31:48FromDiscord<Kiloneie> + nim extension
19:32:08FromDiscord<Kiloneie> you can watch my #1 intro video for how to set it all up if you need help
19:32:30rayman22201@lqdev[m] I can't seem to get your game to run :-(
19:32:53lqdev[m]rayman22201: what's your issue?
19:33:01rayman22201https://github.com/liquid600pgm/memrecall/issues/5
19:33:20lqdev[m]oh, this.
19:33:21rayman22201also: https://github.com/liquid600pgm/memrecall/issues/4
19:33:34lqdev[m]what graphics drivers are you on?
19:34:00shashlickanyone done a nim project using wxwidgets
19:34:06shashlickwithout using the entire wxnim
19:34:09*Kaivo quit (Quit: WeeChat 2.6)
19:34:16*sealmove quit (Quit: WeeChat 2.6)
19:34:38*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:35:05rayman22201lqdev[m] Quadro Desktop/Quadro Notebook Driver Release 435
19:36:09lqdev[m]then this is very weird
19:36:18lqdev[m]maybe nvidia is doing their thing again
19:36:40lqdev[m]I'll update rapid to not require direct state access
19:37:45lqdev[m]rayman22201: I'll let you know when I'm done with that, hopefully it will work!
19:38:22rayman22201cool :-)
19:38:38rayman22201yay Nvidia close source driver nonsense :-P
19:40:19lqdev[m]this didn't happen to me while I was using nvidia drivers, can you tell me which OpenGL version does `glxinfo | grep OpenGL` (or some windows equivalent) report?
19:40:20disruptek!eval let 😉 = "wink"; echo 😉
19:40:23NimBotwink
19:43:12rayman22201lqdev[m] https://gist.github.com/rayman22201/e76535c6c8ca2950aa7aa0c81870f7aa
19:43:42rayman22201oh, I just realized it's using the embedded intel drivers
19:43:44rayman22201interesting
19:44:45lqdev[m]rayman22201: you can change which graphics driver an app uses in windows's settings
19:45:13rayman22201yeah, looking to see if I can do that now
19:45:54lqdev[m]I'll have to fix it anyways since your graphics cards only support the older EXT variant, I need the ARB one since it has a different API
19:47:33rayman22201well this is absurd. My laptop has an external monitor plugged in. Windows is telling me that it's using the Nvidia drivers for the external monitor, but the intel drivers for the attached monitor.
19:48:19Cadeywhen's nimcon?
19:48:38rayman22201I suppose you should fix it anyway, because many lower end laptops only have the embedded Intel Graphics card these days.
19:49:51lqdev[m]I'm currently in the process of fixing it, give me like, 20 minutes or more
19:50:04lqdev[m]I need to port the entire codebase to use my internal GLContext thing
19:50:15lqdev[m]tbh there's not that much that used this extension though
19:50:26lqdev[m]only RCanvas used it for framebuffers
19:52:54rayman22201sorry for my weird graphics configuration :-/
19:57:15lqdev[m]it's not your fault
19:57:42lqdev[m]the driver developers failed, all we can do is adjust to their mistakes :/
19:58:20rayman22201indeed
19:58:48rayman22201I'm still confused why Windows is falling back to the intel drivers for one monitor and not the other... but that's an entire other can of worms
19:59:12disruptektwo different video cards.
20:01:59FromGitter<awr1> @rayman22201 some of the AMD laptops have vega solutions
20:02:46shashlickoh man finally - https://travis-ci.org/genotrance/nimarchive
20:03:38rayman22201well duh, of course there are two video cards. I just don't understand why Windows is not letting the Nvidia card control both monitors. (My guess is something crashed and Windows silently went into a fallback mode.)
20:04:38rayman22201I probably need to restart, but I have too many things open that I don't want to close atm :-P
20:05:16lqdev[m]rayman22201: try `nimble install rapid` and recompile the game
20:05:20lqdev[m]it should work now
20:07:03rayman22201@shashlick does that mean we will have tar file support soon? yay :-)
20:07:22rayman22201lqdev[m] trying now
20:10:19shashlickyou already have tar file with untar
20:10:23shashlickand gz
20:10:40shashlickbut now you will have pretty much anything supported by libarchive
20:11:00shashlicki might need to add more support but for now there's zlib, bzlib and lzma linked in
20:11:11rayman22201yay
20:11:25rayman22201lqdev[m] it works now 👍 🎉
20:11:36rayman22201and there goes my productivity for the day
20:12:40shashlickokay - any more concerns with getHeader as it stands today? else i'll be merging v020 into nimterop master
20:13:14*narimiran quit (Ping timeout: 240 seconds)
20:13:20lqdev[m]rayman22201: the game's not that long, even if you collect all the atoms :)
20:13:22lqdev[m]anyways, good luck!
20:14:08rayman22201lol. I'm really bad at games. Thanks though :-)
20:14:49shashlick@lqdev - i added a way to set -d:xyz in code itself - needed it for nimarchive anyway
20:15:02FromDiscord<Kiloneie> Here we go again!
20:15:03FromDiscord<Kiloneie> LINK: https://youtu.be/YFSuu0degn0
20:15:36shashlick@lqdev - https://github.com/genotrance/nimarchive/blob/nimterop/nimarchive/archive.nim#L24
20:16:06lqdev[m]oh, this is really nice
20:16:19lqdev[m]I'm gonna try getHeader out when I'll be porting rapid to SDL
20:16:56shashlickokay looking forward to your feedback
20:17:00FromDiscord<Kiloneie> I tried your suggestion nmirian, which i think worked for part 1 of the video, but then i fucked up and spent way too much time reading, which resulted in a worse video and more time recording and editing... good suggestion though, not exactly what you had in mind, but it's gonna help me a lot with the next video. I should read as little as possible, only explanations and such that i can't do it freely, i get stuck when reading a LOT, make
20:19:55shashlick@PMunch - is there any reason why the wxnim wrapper doesn't support dlls? static link only?
20:47:03*nsf quit (Quit: WeeChat 2.5)
21:00:58*clyybber joined #nim
21:29:23*traviss joined #nim
21:34:23*daddoo quit (Quit: Leaving)
21:37:08*shomodj joined #nim
21:40:54FromGitter<zetashift> @lqdev why not just stick with GLFW?
21:41:48lqdev[m]@zetashift it's not about the video, it's about the audio
21:41:52lqdev[m]apparently I can't use libsoundio
21:42:22lqdev[m]so because I'm gonna use sdl_audio I thought why not use sdl_video anyways
21:42:32*solitudesf- quit (Ping timeout: 245 seconds)
21:50:21FromGitter<zetashift> ah
21:54:19FromGitter<davidbruce> In sdl2 how do you pass a ptr of a Rect to the copy proc ⏎ https://github.com/nim-lang/sdl2/blob/b5e38a2a2c0a12d63f4d432a8d67d74097580acb/src/sdl2.nim#L1001 ⏎ ⏎ I guess the better question is how do I make a ptr to a tuple? [https://gitter.im/nim-lang/Nim?at=5d951c8bfcb47b627f06d6b8]
21:55:11FromGitter<zetashift> addr(aRect)?
21:55:15lqdev[m]@davidbruce use `addr`
21:55:41FromGitter<davidbruce> thaaaaaaaaaaaaaaaaaaank you
21:55:54lqdev[m]or aRect.addr, whichever you prefer
21:56:13FromGitter<zetashift> ^ yes!
21:56:25FromGitter<davidbruce> Is this covered anywhere in the docs?
21:57:21*abm joined #nim
21:57:21FromGitter<zetashift> I'm not sure but I had a similiar problem like you following lazyfoo's tutorial and I think I got my answer from: https://github.com/Vladar4/sdl2_nim/tree/master/examples
21:57:35FromGitter<zetashift> or do you mean passing pointer arguments to proc's?
21:58:05FromGitter<davidbruce> Sorry, passing pointer arguments in procs
21:58:17FromGitter<davidbruce> The other link looks really useful too though, thanks!
21:59:34FromGitter<zetashift> we have this: https://nim-lang.org/docs/system.html#addr%2CT
22:00:12FromGitter<zetashift> and this: https://nim-lang.org/docs/manual.html#statements-and-expressions-the-addr-operator but in the 2 tutorials it isn't covered IIRC
22:01:31FromGitter<davidbruce> Thanks for the links again, you've been a big help!
22:11:58FromDiscord<exelotl> is there a way to pass environment variables to staticExec?
22:14:25FromGitter<zetashift> shouldn't those automatically be found when it executes the other process?
22:27:05*Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:36:04FromDiscord<exelotl> yeah, I wanted to override one at compile time
22:36:55FromDiscord<exelotl> (trying to set up a nimterop script that invokes pkg-config, but with the PKG_CONFIG_PATH variable being set to some directory that's local to the project)
22:43:22*theelous3 quit (Ping timeout: 245 seconds)
22:43:51shashlickJust use getEnv
22:44:06*theelous3 joined #nim
22:50:05*theelous3 quit (Ping timeout: 276 seconds)
22:50:25shashlickputEnv rather
22:51:38*clyybber quit (Quit: WeeChat 2.6)
22:58:54*shomodj quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:12:21FromDiscord<exelotl> oh cool static: putEnv does work
23:15:11*krux02_ joined #nim
23:15:36FromDiscord<juan_carlos> Stuff that works on NimScript usually works static, and is listed on the NimScript docs.
23:17:48*krux02 quit (Ping timeout: 245 seconds)
23:28:28*krux02_ quit (Remote host closed the connection)
23:29:01*theelous3 joined #nim
23:29:15*theelous3 quit (Read error: Connection reset by peer)
23:30:06FromDiscord<treeform> @Kiloneie good job. It's hard sticking with some thing once it's not a novelty any more.
23:32:48disrupteksomeone confirm this one for me:
23:33:12disruptekput -d:danger in your nim.cfg and build something normally. it will report a `Dangerous Release Build`. but, it's actually not one.
23:37:13*abm quit (Read error: Connection reset by peer)