<< 13-08-2020 >>

00:10:45*endragor joined #nim
00:15:27*endragor quit (Ping timeout: 265 seconds)
00:38:09disrupteksheep are fine but goats are a little tight.
00:38:24FromDiscord<Rika> :ThonkDumb:
00:38:47disruptekrika:
00:39:10*JustASlacker quit (Ping timeout: 246 seconds)
00:41:06disruptekdo we need to talk about this?
00:43:03FromDiscord<Rika> no
00:43:12disruptekokay.
00:43:24disruptekplease don't let it happen again.
00:47:05disruptekno.
00:47:11Yardanicoyes
00:48:48disruptekrika: i won't suffer this attitude.
00:49:23FromDiscord<Rika> lol
00:49:23*gogoprog quit (Read error: Connection reset by peer)
00:50:56*gogoprog joined #nim
00:56:45*waleee-cl quit (Quit: Connection closed for inactivity)
01:15:49*endragor joined #nim
01:57:52*apahl quit (Ping timeout: 260 seconds)
01:59:27*apahl joined #nim
02:19:16*endragor quit (Ping timeout: 246 seconds)
02:22:45*theelous3 quit (Read error: Connection reset by peer)
02:26:41bungis https://play.nim-lang.org/ server down ?
02:27:36leorizeseems like it
02:27:45leorizedom96: can you take a look at that?
02:38:42*muffindrake quit (Ping timeout: 260 seconds)
02:40:52*endragor joined #nim
02:40:55*muffindrake joined #nim
02:55:23FromDiscord<Yardanico> It's been down for ~10 hours
02:55:31FromDiscord<Yardanico> Or more
02:56:57*bunbunbunbunny joined #nim
03:04:49*arecacea1 quit (Remote host closed the connection)
03:05:58*arecacea1 joined #nim
03:29:28*endragor quit (Quit: Leaving...)
03:31:11*endragor joined #nim
03:38:49*zen9 joined #nim
03:45:39zen9hello
03:45:55leorizehi
03:46:13zen9can you clear my doubt ?
03:46:22leorizeit depends
03:46:27zen9Kk
03:46:37leorizeso what's your question?
03:47:13zen9can nim be used for android development ?
03:47:50leorizeyes, but the tooling is premature and not many have written guides on this
03:48:14zen9so what is the main(interesting) use of nim ?
03:49:04*vicfred joined #nim
03:50:44leorizeit's a system programming language that gears torwards general usage, so... you can use nim for basically anything
03:50:46*zen9 quit (Remote host closed the connection)
03:50:59FromDiscord<Elegant Beef> As a C/C++ replacement with a more expressive and debately cleaner syntax
03:51:02leorizeoh lol they're gone :p
03:51:26FromDiscord<Elegant Beef> I dont understand people
03:52:08bunghttps://travis-ci.org/github/tulayang/asyncmysql/jobs/717469192
03:52:31bunganyone experience with osx travis-ci mysql
03:53:02bungit alwasy stuck with `cd Nim` dont know why
03:53:13leorizeit's travis, it doesn't work
03:53:32leorizewhich is probably why the author left it in "Allowed failures"
03:54:47bungso it will not work on travis-ci, I may choose github ci
03:57:01FromDiscord<flywind> maybe change config because its config may be too old.
03:57:56FromDiscord<flywind> https://travis-ci.org/github/planety/prologue/jobs/717252477/config
04:00:23leorizeno matter how old the config is, it's kinda weird that it crashes on a `cd`
04:02:53bungI checked RMySQL package's travis-ci it just works..
04:05:33bunglet me commented `fast_finish: true`
04:05:58leorizefast finish just means that the task will stop executing once something fails
04:06:01*supakeen quit (Quit: WeeChat 2.8)
04:06:12leorize(something that's not "allowed to fail" fail)
04:06:37*supakeen joined #nim
04:07:15*rockcavera quit (Remote host closed the connection)
04:10:47bunghmm, ok let me try build nim another way
04:11:19leorizeyou can just switch to github ci, someone made a workflow that builds nim
04:14:26bunghaven't seen example with mysql on osx, I'll check it later
04:15:12leorizethere isn't any easy way to get mariadb/mysql working on github actions afaict
04:17:38bung:(
04:18:29FromDiscord<flywind> `testament all` will test something like `tests/*/t_a.nim` and `tests/t_a.nim` won't be tested. `testament cat .` will test anything with `t` prefix in the tests directory. Which way is better?
04:19:22leorizegive tests proper categories
04:19:31leorizealternatively you can use status' testutils
04:19:35leorize!repo testutils
04:19:36disbothttps://github.com/status-im/nim-testutils -- 9nim-testutils: 11testrunner et al 15 8⭐ 3🍴 7& 1 more...
04:19:54*endragor quit (Remote host closed the connection)
04:20:29*endragor joined #nim
04:22:03Yardanicoog nice
04:22:05Yardanicooh nice*
04:22:09Yardanicothey have fuzzer support
04:22:10Yardanicothat's really cool
04:22:33FromDiscord<flywind> Thanks. I use `testament` heavily. It works fine and very fast.
04:24:45*endragor quit (Ping timeout: 240 seconds)
04:35:28*zen9 joined #nim
04:35:56*zen9 quit (Remote host closed the connection)
04:38:15*endragor joined #nim
04:59:00*arecacea1 quit (Remote host closed the connection)
04:59:01*gogoprog quit (Read error: Connection reset by peer)
04:59:24*arecacea1 joined #nim
05:00:07*gogoprog joined #nim
05:26:48*Jesin quit (Quit: Leaving)
05:55:48*arecacea1 quit (Remote host closed the connection)
05:56:00*solitudesf joined #nim
05:56:32*vicfred quit (Quit: Leaving)
05:57:05*arecacea1 joined #nim
05:59:22*apahl quit (Ping timeout: 260 seconds)
06:00:13*apahl joined #nim
06:08:40*vegai joined #nim
06:11:54*vqrs quit (Ping timeout: 244 seconds)
06:13:08*vqrs joined #nim
06:43:52ForumUpdaterBotNew thread by Mollusk: Tux - A good first project for learning Nim (or any language), see https://forum.nim-lang.org/t/6674
06:47:37*bunbunbunbunny quit (Ping timeout: 264 seconds)
06:48:24FromDiscord<iWonderAboutTuatara> hi everyone
06:48:52FromDiscord<iWonderAboutTuatara> I can't parse this error
06:48:57FromDiscord<iWonderAboutTuatara> sent a long message, see http://ix.io/2u24
06:49:09FromDiscord<iWonderAboutTuatara> throws both:↵d:\Scripts\Nim\necklaceCounting.nim(14, 22) template/generic instantiation of `generateAlphabet` from here↵d:\Scripts\Nim\necklaceCounting.nim(2, 23) Error: no generic parameters allowed for seq
06:49:25FromDiscord<iWonderAboutTuatara> can someone help me understand whats happening?
06:51:23silvernode[m]I think it might have to do with how you are creating your seq
06:51:44silvernode[m]I' not expert yet but that seems to be what the error is complaining about.
06:52:04silvernode[m]hopefully that gives you a useful clue
06:52:57silvernode[m]If I didn't have to go to work right now I'd try helping more, but I am sure someone else will show up and help some more. ttyl
06:53:44*PMunch joined #nim
07:02:05FromDiscord<iWonderAboutTuatara> I don't know how to create an seq lol
07:02:17FromDiscord<iWonderAboutTuatara> I've tried everything I could think of
07:02:40FromDiscord<iWonderAboutTuatara> ie without the =, with the =, without the type specification, etc
07:09:00FromDiscord<pointystick> I pasted your code into a new .nim file and it compiled without any warnings or errors. Is this exactly the code you're running or have you tweaked it for Discord?
07:09:53FromDiscord<Yardanico> your code is incorrect
07:10:05FromDiscord<Yardanico> @iWonderAboutTuatara you didn't specify a return type properly
07:10:39FromDiscord<Yardanico> but even then there's a few problems
07:11:22FromDiscord<InventorMatt> sent a code paste, see https://play.nim-lang.org/#ix=2u2c
07:11:37FromDiscord<InventorMatt> that should solve your problem @iWonderAboutTuatara
07:12:06*JustASlacker joined #nim
07:12:06FromDiscord<Yardanico> oh wait @iWonderAboutTuatara maybe you just want to make a random string or something?
07:12:41PMunchHmm, the playground is still not up?
07:12:44Yardanicono
07:12:57Yardanicoit's been down for like 16 hours now :(
07:13:05PMunchYeah I know..
07:13:21FromDiscord<iWonderAboutTuatara> @pointystick you may have missed the very last line
07:13:29PMunchIt had run out of disk space, so I did some cleanup of the docker cache, installed some updates, and rebooted the machine
07:13:33PMunchBut it never came back up
07:13:33FromDiscord<pointystick> nah, I just need to add a 'when isMainModule:'
07:13:39FromDiscord<pointystick> silly oversight on my part
07:13:46FromDiscord<Yardanico> @iWonderAboutTuatara what do you want to do exactly with the code?
07:13:49PMunchAnd only dom96 has access to do anything with it when it's in this state..
07:13:50FromDiscord<Yardanico> generate a k number of alphabets?
07:13:56PMunchWell I think he's the only one
07:14:01FromDiscord<Yardanico> or generate a part of the alphabet?
07:14:12Yardanico@dom96 then
07:14:25FromDiscord<iWonderAboutTuatara> @InventorMatt thanks for that, does result have a type based on what the peoc returns?
07:14:34FromDiscord<Yardanico> result is an implicit variable
07:14:43FromDiscord<Yardanico> which is the return value of the proc
07:14:48FromDiscord<Yardanico> it's always there for all procs which return a value
07:14:56FromDiscord<iWonderAboutTuatara> Yeah, I didn't really think that through
07:15:35FromDiscord<Yardanico> basically errors in your code were: seq instead of string, using strings for a range (when you want from letter a to z - you need 'a' .. 'z')
07:15:41FromDiscord<iWonderAboutTuatara> can people on the IRC see the discord messages?
07:15:47FromDiscord<Yardanico> yes
07:15:53FromDiscord<iWonderAboutTuatara> ah ok
07:16:12FromDiscord<Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=2u2e
07:16:35FromDiscord<Yardanico> but there's a more efficient way - use constants
07:16:45FromDiscord<Yardanico> so you compute at compile time, not at runtime
07:17:35FromDiscord<Elegant Beef> sent a code paste, see https://play.nim-lang.org/#ix=2u2f
07:17:54FromDiscord<Yardanico> > toSeq 😛
07:18:05FromDiscord<Elegant Beef> wut?
07:19:40FromDiscord<iWonderAboutTuatara> ok i got a new, weirder error
07:19:43FromDiscord<iWonderAboutTuatara> sent a long message, see http://ix.io/2u2g
07:19:50FromDiscord<Yardanico> yes
07:19:54FromDiscord<Yardanico> that's because you should use chars
07:19:57FromDiscord<Yardanico> not strings
07:19:57FromDiscord<iWonderAboutTuatara> using
07:20:02FromDiscord<iWonderAboutTuatara> sent a code paste, see https://play.nim-lang.org/#ix=2u2h
07:20:03FromDiscord<Yardanico> that's incorrect
07:20:12FromDiscord<Yardanico> "a" and "z" here are strings, not chars
07:20:14FromDiscord<iWonderAboutTuatara> oh is `` chars?
07:20:17FromDiscord<Yardanico> you should do 'a' .. 'z'
07:20:26FromDiscord<Yardanico> not the backquote, just a normal single quote
07:20:42FromDiscord<iWonderAboutTuatara> ''
07:20:50FromDiscord<Yardanico> also can you tell what would you use generateAlphabet for?
07:20:51FromDiscord<Elegant Beef> Yea as is standard in most languages single quote is char, double string, and backquote in nim is for symbol stropping
07:20:57FromDiscord<Yardanico> it seems strange that you use seq[char] and stuff
07:21:17FromDiscord<iWonderAboutTuatara> theoretically if I change it to : seq[string] that should work?
07:21:29FromDiscord<iWonderAboutTuatara> I need to make a seq of the first x alphabets in the alphabet
07:21:35FromDiscord<Yardanico> letters?
07:21:39FromDiscord<Yardanico> no, it won't work
07:21:53FromDiscord<Yardanico> because there's no .. for two string arguments
07:21:57FromDiscord<Yardanico> not sure what would that do
07:22:14FromDiscord<Elegant Beef> it'd be silly and use a lot of ram
07:22:21FromDiscord<iWonderAboutTuatara> oh right
07:22:26FromDiscord<iWonderAboutTuatara> that would not make sense yeah
07:22:33FromDiscord<Yardanico> @iWonderAboutTuatara you can do all that at compile-time
07:22:45FromDiscord<Yardanico> except if your number is determined at runtime
07:22:58FromDiscord<iWonderAboutTuatara> ideally its userinput
07:23:04FromDiscord<iWonderAboutTuatara> but it doesn't necessarily have to be
07:23:12FromDiscord<iWonderAboutTuatara> I just want to use procs to get a better feel for nim
07:23:19FromDiscord<iWonderAboutTuatara> how would I do this in compile time?
07:23:25FromDiscord<Yardanico> so I still didn't understand
07:23:32FromDiscord<Yardanico> you want to generate the full alphabet X times?
07:25:18FromDiscord<iWonderAboutTuatara> that is what would happen because of a logic error
07:25:29FromDiscord<iWonderAboutTuatara> but the goal is generate first x letters of the alphabet
07:25:48Yardanicoso max number can be the full alphabet?
07:25:52*Vladar joined #nim
07:26:00FromDiscord<iWonderAboutTuatara> this is probably doable at compile time by defining an array with chars a to z
07:26:02FromDiscord<iWonderAboutTuatara> yeah
07:27:31FromDiscord<Elegant Beef> yea this can then just be `alphabet[0..input]`
07:27:40FromDiscord<Elegant Beef> after my previous code of course
07:28:02FromDiscord<iWonderAboutTuatara> what does that do?
07:28:05FromDiscord<Elegant Beef> Guys crack the whip so dom fixes the plaayground!
07:28:10Yardanicothat's a slice
07:28:16FromDiscord<iWonderAboutTuatara> yes the playground was down yesterday as well
07:28:18FromDiscord<iWonderAboutTuatara> not sure whats going on
07:28:28FromDiscord<iWonderAboutTuatara> slicing what?
07:28:33FromDiscord<iWonderAboutTuatara> seems to be shorthand for something
07:28:44FromDiscord<Elegant Beef> Yea im slicing the constant alphabet char sequence i previously generated
07:28:49FromDiscord<iWonderAboutTuatara> (edit) 'something' => 'something,'
07:28:51Yardanico@iWonderAboutTuatara slicing a string
07:28:59Yardanicoif you come from python, slices are almost the same, but they're inclusive
07:29:01FromDiscord<iWonderAboutTuatara> oh its dependant on that
07:29:05Yardanicowell it doesn't have to be a string
07:29:10Yardanicoyou can slice arrays, sequences
07:29:15FromDiscord<iWonderAboutTuatara> I learned a bit about slicing when i used rust for a while
07:29:15Yardanicoor make a slice operator for your own type
07:29:25FromDiscord<iWonderAboutTuatara> but I mostly come from python yea
07:29:35Yardanicowell python has slices, they're used a lot
07:29:43FromDiscord<iWonderAboutTuatara> yeah
07:30:36FromDiscord<iWonderAboutTuatara> what does alphabet in ```alphabet[0..input]``` mean?
07:30:53FromDiscord<iWonderAboutTuatara> wait you can tag me from IRC?
07:30:55FromDiscord<iWonderAboutTuatara> huh
07:31:13FromDiscord<iWonderAboutTuatara> the bridge bot is super well implemented i guess
07:31:43FromDiscord<iWonderAboutTuatara> semes to be a variable which i would have defined elsewhere
07:31:55FromDiscord<Elegant Beef> alphabet in that case is my previous code which says it's a sequence of chars which is `('a'..'z').toSeq`
07:31:57FromDiscord<Yardanico> irc bridge is https://github.com/Yardanico/ircord/ 🙂
07:32:14*krux02 joined #nim
07:32:15FromDiscord<Yardanico> and it's specifically made for nim channels
07:32:25FromDiscord<iWonderAboutTuatara> oh I did not see your previous code
07:32:30FromDiscord<iWonderAboutTuatara> that makes much more sense
07:33:12PMunch@Elegant Beef, I'm afraid he might be on vacation :(
07:33:18FromDiscord<Elegant Beef> Damn
07:33:23FromDiscord<Elegant Beef> Going to need a bigger whip
07:34:48PMunchA trans-continental whip
07:35:10PMunchWell, I don't know where he is on vacation :P Probably not too far away because of Corona..
07:35:40FromDiscord<Elegant Beef> Well i'll donate for you to go do it, the UK is bad enough they probably will let you in
07:36:03PMunchDo what? Track down dom?
07:36:10FromDiscord<Elegant Beef> It's a small island how hard can it be
07:37:54FromDiscord<iWonderAboutTuatara> how do you get the number of elements in a sequence?
07:37:55FromDiscord<Elegant Beef> You're doing a rewrite of your calculator thing right?
07:38:00FromDiscord<Elegant Beef> .len
07:38:14PMunchYup
07:38:22FromDiscord<iWonderAboutTuatara> thanks
07:38:42FromDiscord<iWonderAboutTuatara> I am yeah
07:38:42FromDiscord<Elegant Beef> So for your custom calculators are you going to use nimscript to allow easy expansion without recompilation?
07:39:09FromDiscord<Yardanico> @iWonderAboutTuatara you might like https://narimiran.github.io/nim-basics/
07:39:20PMunchHeh, I wasn't planning on it
07:39:30PMunchBut my calculator is already programmable in it's own language
07:39:56FromDiscord<Elegant Beef> Ah, i forgot about that part
07:41:55FromDiscord<iWonderAboutTuatara> I've been using the official tutorial and nim by example
07:42:11FromDiscord<iWonderAboutTuatara> I think the main issue im running into is that I don't really understand what the compiler is telling me yet
07:42:18FromDiscord<iWonderAboutTuatara> which as i get more used to nim, should go away
07:42:31FromDiscord<iWonderAboutTuatara> but I'll keep that link in mind as a resource for sure @Yardanico
07:44:09PMunchPlease share if you find any error messages that seem cryptic
07:44:14PMunchMight be an easy fix :)
07:45:03FromDiscord<Elegant Beef> The `buildMyProduct` proc just doesnt work, says something about an undeclared identified
07:45:13FromDiscord<Elegant Beef> (edit) 'identified' => 'identifier'
07:45:23FromDiscord<iWonderAboutTuatara> they're not super cryptic, they're just not worded the way I'm used to
07:45:43FromDiscord<iWonderAboutTuatara> so I misunderstand them
07:46:03FromDiscord<iWonderAboutTuatara> just one of the things you have to get used to when you learn a new language it seems, but I will be sure to let you know if it happens
07:46:21FromDiscord<iWonderAboutTuatara> do we use and keyword in nim instead of &&?
07:46:26Yardanicoyes
07:46:27FromDiscord<Elegant Beef> yes
07:46:29FromDiscord<iWonderAboutTuatara> seems like && is a string concatenator?
07:46:32PMunchYeah, getting used to a languages error messages is just one of those things
07:46:39Yardanico@iWonder no
07:46:40Yardanico& is
07:46:45FromDiscord<iWonderAboutTuatara> oh I see
07:46:48FromDiscord<iWonderAboutTuatara> is && anything?
07:46:52Yardanicono
07:46:56FromDiscord<Elegant Beef> It *could* be though
07:46:56PMunchYardanico, does that actually work to highlight him?
07:46:57Yardanicobut you can always make it an operator :)
07:47:02FromDiscord<Elegant Beef> We can make our own opeprators!
07:47:05YardanicoPMunch: yes
07:47:06FromDiscord<iWonderAboutTuatara> also I assume we use or and not right, instead of ||(bleh) and !
07:47:09Yardanicoyes
07:47:23FromDiscord<iWonderAboutTuatara> thanks
07:47:33FromDiscord<Elegant Beef> Yea but if you're a dumb dumb like me it posts my name then `beef` since i have a space in my name
07:48:02PMunchYardanico, neat!
07:48:13FromDiscord<Elegant Beef> `!=` is shorthand for `not a == b` though
07:48:16PMunchI thought you had to type the entire nick!
07:48:25Yardanicowell sometimes it can have bad effects, but yes :P
07:48:27YardanicostartsWith
07:48:32PMunch@Elegant, but you still get tagged?
07:48:44FromDiscord<Elegant Beef> Yea
07:48:51FromDiscord<Elegant Beef> Assuming you just did Elegant?
07:48:56PMunchYardanico, what does it do if you have multiple people starting with the same thing?
07:49:05Yardanicoit'll ping the first one it finds :D
07:49:06PMunchYup, that's exactly what I did
07:49:21PMunchYardanico, and they're sorted how?
07:49:23FromDiscord<Elegant Beef> Yea i could tell it didnt have beef after it 😄
07:49:35PMunchAlphabetically, or in talking order like the tab-completion of nicks on IRC
07:49:43PMunch(at least in my client)
07:50:06YardanicoI don't exactly know about sorting
07:50:13Yardanicoit comes from discord and then Dimscord does some stuff
07:50:18Yardanicoand I just iterate over dimscord's cache
07:50:27PMunchOh, so it just converts "Elegant" to a tag, so if someone does <at>Elegant Beef it will turn Elegant into a tag and leave Beef?
07:50:40PMunchYardanico, I see
07:50:47PMunchSo it's "undefined" then :P
07:50:48Yardanicoyes, it just captures the string after @ before the first space
07:50:56Yardanicobecause otherwise it'd be much harder to properly do
07:51:10FromDiscord<Elegant Beef> Yard just likes making me see Elegant Beef Beef
07:52:03FromDiscord<Elegant Beef> In his defence he has told me to put an underscore in my name, and my response was to put an underscore in his suggestion
07:53:28FromDiscord<Varriount> Does it work in the other direction?
07:53:36Yardanicono
07:53:44Yardanicoonly from the start of the nickname
07:53:52PMunchSent dom an e-mail about the playground server, in case he's on vacation and not checking IRC :P
07:54:08FromDiscord<Elegant Beef> Who would do such a thing, they'd miss me terribly
07:54:10FromDiscord<Varriount> No, I mean, from Discord to IRC
07:54:17FromDiscord<Elegant Beef> I mean IRC has it's own ping rules
07:54:19PMunchDon't think so
07:54:24Yardanicowell you seem to be rusty @Varriount :P
07:54:33Yardanicohave you not been to IRC in a few last years? :P
07:54:38YardanicoIRC doesn't have server-side pings
07:54:47Yardanicoit's the clients which do notifications
07:54:48PMunchIRC itself doesn't have a concept of pinging IIRC. It's just clients highlight your name if it appears anywhere in the text
07:54:57FromDiscord<Elegant Beef> Well you can also highlight keywords
07:55:02FromDiscord<Varriount> I'm aware of that, but clients default to highlighting nicknames
07:55:07Yardanicoyes
07:55:14FromDiscord<Varriount> Most clients, anyway
07:55:20Yardanicowell, so what's the problem?
07:55:24PMunchI guess the bot could try do expand nicknames
07:55:36PMunchBut that could go horribly wrong :P
07:55:48Yardanicoon discord people have the quote thing
07:55:56PMunchIf I was out in my yardanico watering the flowers for example
07:55:59FromDiscord<Varriount> Quote thing?
07:56:06FromDiscord<Yardanico> > Quote thing?↵@Varriount quote
07:56:09FromDiscord<Elegant Beef> Dont call what discord does quoting
07:56:18FromDiscord<Elegant Beef> That's fucking atrocious is what that is
07:56:26Yardanicowell but it's still there and some people use it
07:56:36FromDiscord<Elegant Beef> I use it but i refuse to acknowledge it as quoting
07:56:40FromDiscord<Varriount> PMunch: Just expand on '@' signs or something
07:56:46FromDiscord<lqdev> it's really primitive
07:56:52Yardanico@Varriount I doubt anyone would use that
07:56:57Yardanicodiscord people are usually much lazier :P
07:57:04Yardanicoin typing nicknames
07:57:09FromDiscord<lqdev> like they couldn't implement proper message metadata so they just used what they had at hand
07:57:12FromDiscord<Elegant Beef> Element has better quote rendering
07:57:21FromDiscord<Varriount> I would. It's annoying having to manually type out all your nicknames on my phone
07:57:40FromDiscord<Elegant Beef> Just call everyone a cunt, problem solved
07:58:14FromDiscord<Elegant Beef> Either everyone will read what you type, or everyone will ignore what you type, you got a 50:50 split on hitting the jackpot
07:58:59PMunchHaha, great solution :P
08:00:31*sky73 joined #nim
08:01:38sky73Error: argument for command line option expected: '-d' <- i am getting this error while compiling if anyone knows how to fix then please help me out!
08:01:51Yardanicowhat's your full command?
08:02:05Yardanico"-d" should be used together with the symbol you want to define
08:02:06sky73nim compile -d:ssl --run discordBot.nim
08:02:44Yardanicoit should work just fine
08:02:50Yardaniconim c -d:ssl -r discordBot.nim
08:02:57Yardanicoor nim compile --define:ssl --run discordBot.nim
08:02:59Yardanicoor your command
08:03:08Yardanicomaybe you have some invalid switches in your config files?
08:03:49sky73sorry but i am new here just started learning nim yesterday so idk about that config file but thanks for help!
08:04:01Yardanicowell did you create any .cfg or .nims files yourself?
08:04:06sky73no
08:04:10Yardanicothen it should work
08:04:13Yardanicowhat's your nim version?
08:04:15Yardaniconim -v
08:04:30sky73yes i executed this command!
08:04:44sky73Nim Compiler Version 1.2.6 [Windows: amd64]
08:04:52Yardanicothat should be fine
08:07:05sky73thanks
08:07:10sky73now its working :)
08:07:55FromDiscord<Elegant Beef> just cause i like typing less `nim c -d:ssl -r discordBot.nim` does the exact same 😄
08:08:10FromDiscord<Elegant Beef> *can even drop the .nim* afaik
08:08:15Yardanicoyes
08:28:30*Trustable joined #nim
08:42:33sky73where i put all these new Compiler dependencies (dlls.zip,mingw64)?
08:43:05*Guest32962 quit (Ping timeout: 240 seconds)
08:43:32PMunchdlls.zip needs to be unpacked, you probably don't need them for most things. But some parts of the standard library requires them and in that case you can pick the ones you need and ship with your application.
08:43:47PMunchmingw just needs to be installed somewhere Nim can call it
08:44:35sky73ok thanks1
08:51:39PMunchDid someone mess up when they wrote this error message? Error: unhandled exception: 'num' is not accessible using discriminant 'kind' of type 'Element' [FieldDefect]
08:51:52Yardanico?
08:51:58PMunchI have a feeling that the 'kind' part is supposed to be the value it got
08:52:07PMunchInstead of the name of the field
08:52:37PMunchLike I would expect the error to be something like: Error: unhandled exception: 'num' is not accessible using discriminant 'String' of type 'Element' [FieldDefect]
08:56:26*Vladar quit (Remote host closed the connection)
08:58:13*hnOsmium0001 quit (Quit: Connection closed for inactivity)
09:00:30*Vladar joined #nim
09:10:19FromDiscord<--HA--> How can I check if a type is one of a number of possible types? Instead of `when v isnot int and v isnot string and v is not float:` I'd like something more like `when v isnot [int, string, float]:`
09:12:53PMunchwhen v notin [int, string, float]?
09:13:37FromDiscord<lqdev> i think it'd be `when typeof(v) notin [int, string, float]`
09:14:12PMunchHmm, neither worked..
09:14:37sky73i download dlls.zip added dlls files path where nimble.exe exits but nothing working for me still getting this error : (libcrypto-1_1-x64|libeay64).dll
09:14:44PMunchtypeof returns "type byte" but the array is of type "typedesc"
09:14:48FromDiscord<flywind> sent a code paste, see https://play.nim-lang.org/#ix=2u2C
09:15:06PMunchsky73, those are loaded dynamically by your program, not the compiler
09:15:14PMunchSo you need to place them somewhere the program can reach them
09:15:19PMunche.g. in the same folder
09:15:48sky73so i need to add in my workspace/
09:16:32PMunch@flywind, even easier: http://ix.io/2u2D/nim
09:16:54PMunchAnd @--HA--, this works ^
09:17:06PMunchsky73, well you don't have to
09:17:25PMunchIt just has to be in your library path somewhere
09:17:31PMunchNot quite sure how Windows handles it
09:17:46PMunchBut on Linux you could also set LD_LIBRARY_PATH to point to them
09:18:17sky73yeah its same as windown evt variables path
09:18:19FromDiscord<--HA--> PMunch, perfect! Thank you
09:26:52*sky73 quit (Remote host closed the connection)
09:43:00ForumUpdaterBotNew thread by ElAfalw: Object destroyed after editing enum property?, see https://forum.nim-lang.org/t/6676
09:49:16dom96PMunch: the droplet didn't start?
09:58:28*abm joined #nim
10:03:54*bunbunbunbunny joined #nim
10:09:13*bunbunbunbunny quit (Ping timeout: 264 seconds)
10:21:48FromDiscord<Rika> PMunch: "Error: unhandled exception: 'num' is not accessible using discriminant **field** 'kind' of type 'Element' [FieldDefect]" i assume is what it means
10:37:38PMunchdom96, not sure what happened. My SSH connection attempts after the `restart` command just timed out.. But I see it's back up now :)
10:38:02dom96yeah, I couldn't even ping it
10:38:08dom96Had to restart in Digital Ocean
10:38:26PMunchThat is strange, I guess something must've borked the reboot
10:39:04PMunchBut I still get a 502 when trying to compile anything, so something is still not quite right..
10:40:02PMunchAh, my purge deleted all the containers, including the tagged versions
10:40:09PMunchGuess I have to rebuild them all
11:08:09*dddddd_ joined #nim
11:09:54*dddddd__ joined #nim
11:10:13*dddddd quit (Ping timeout: 246 seconds)
11:12:25*dddddd_ quit (Ping timeout: 240 seconds)
11:14:31*tsujp quit (Read error: Connection reset by peer)
11:14:48*tsujp joined #nim
11:23:45*def- quit (Quit: -)
11:24:45bung0.01s$ nimble install -d -y
11:24:45bungcould not import: X509_check_host
11:24:47bungThe command "nimble install -d -y" failed and exited with 1 during .
11:25:26bunghow to handle this ?
11:30:17PMunchAre you missing OpenSSL or something like that?
11:31:54bungit's in travis ci , I checked the version `OpenSSL 1.0.1f 6 Jan 2014`
11:33:48PMunchMight be too old
11:34:00PMunchI think 1.1 is the newest subversion
11:38:43PMunchHmm formatFloat(ffDefault, precision = -1) will output floats without decimals up to a certain size, then it switches to scientific notation. If I do formatFloat(ffDecimal, precision = -1) it seems to ignore the precision bit and prints 6 points after the decimal point..
11:41:38bungyeah, old version ubuntu will cause this, but newer version not work well with mariadb :(
11:45:58*dddddd_ joined #nim
11:46:46*lritter joined #nim
11:48:45*dddddd__ quit (Ping timeout: 240 seconds)
11:50:32*bunbunbunbunny joined #nim
12:03:30*rockcavera joined #nim
12:06:01*supakeen quit (Quit: WeeChat 2.8)
12:06:42*supakeen joined #nim
12:25:28*JustASlacker quit (Ping timeout: 256 seconds)
12:31:46*endragor quit (Remote host closed the connection)
12:39:15FromGitter<ynfle> https://nim-lang.org/docs/macros.html#statements-when-statement Can `when` have `elif`? Is there an equivalent? Or only `else?
12:43:37PMunchYes, it can have elif
12:44:06PMunchIt looks a bit weird but it is `when <condition>: body; elif <condition>: body`
12:46:09FromDiscord<Recruit_main707> welcome back PMunch btw
12:47:50FromGitter<ynfle> Thanks @PMunch!!!
12:48:06FromGitter<ynfle> It should be `elwhen` or something like that
12:48:48PMunchYeah, it's a bit weird that it's elif, but you get used to it
12:48:56PMunch@Recruit thanks :)
12:49:31FromDiscord<--HA--> there isn't a `to_snake_case` in the std lib, is there?
12:50:45PMunchDon't think so
12:51:42FromGitter<ynfle> @--HA--, what's the use case? String or Idents?
13:00:45*endragor joined #nim
13:01:08*endragor quit (Remote host closed the connection)
13:01:17*endragor joined #nim
13:01:20*Trustable quit (Remote host closed the connection)
13:02:10PMunchOkay, the playground should be completely back up and running now
13:03:51FromDiscord<--HA--> I'm writing objects into a database and the object keys become column names, but for the db they are supposed to be snake case. It's not so important for now though, so far I control the objects so I just write their keys as I want them in the type definition.
13:04:26FromDiscord<--HA--> And if I need it I'll write something for snake case. Just thought there might be something since I also saw normalize, although that is a bit different idea.
13:06:28FromDiscord<--HA--> Can I have a type that allows only a certain integer range like 0 to 100?
13:07:28FromDiscord<exelotl> @--HA-- yeah! See this thread where someone was asking about it recently :) https://forum.nim-lang.org/t/6664
13:09:03FromDiscord<--HA--> Ooh nice, range. I was looking in the wrong place, at enums. Cool, thanks
13:14:42PMunchHmm
13:14:47PMunch!eval echo 1/0
13:14:49NimBotinf
13:14:56PMunchShouldn't that rather throw an exception?
13:17:05*gogoprog quit (Read error: Connection reset by peer)
13:18:18*gogoprog joined #nim
13:21:45*drewr quit (Quit: brb)
13:25:41*def- joined #nim
13:33:29*drewr joined #nim
13:33:48Oddmonger!eval echo 0/0
13:33:51NimBotnan
13:33:59Oddmongeryay
13:36:05Zevv!eval echo 0.2 + 1e15 - 1e15
13:36:07NimBot0.25
13:36:16Zevvhow broken is that!
13:36:25superbiait's not broken
13:36:31Zevvit's *sooo* broken
13:37:07Zevvecho 3 + 1e16 - 1e16
13:37:12Zevv!eval echo 3 + 1e16 - 1e16
13:37:15NimBot4.0
13:37:47Zevvthis nim language must be useless. do you even math
13:38:32Zevvit would be great if I get these kind of rounding errors when doing my bookkeeping though
13:38:51PMunchOuch, those aren't great..
13:38:58Zevvgiven that I would own 1e15 of money
13:40:03FromDiscord<Recruit_main707> does nimbot run on latests stable version?
13:52:09*PMunch quit (Quit: Leaving)
14:05:58Zevv!eval echo system.NimVersion
14:06:00NimBot1.2.6
14:07:20*bunbunbunbunny quit (Quit: Lost terminal)
14:15:38Zevvi would like to own 1e15 money tho
14:16:12leorizespecify currency or it can be really small :P
14:16:31Zevveven zamibian zlotys would be fine with me
14:26:55*awe00 joined #nim
14:49:16*superbia quit (Quit: WeeChat 2.9)
14:57:51FromDiscord<lqdev> @--HA-- there's a nimble package for that: https://github.com/lamartire/anycase
15:07:49FromDiscord<benash> Is there a way to express a non-empty seq type? Along the same lines as subranges, but restricting the size of the seq.
15:09:02*superbia joined #nim
15:12:10disruptek~concepts
15:12:10disbotconcepts: 11user-defined type classes; documented in the experimental section of the manual: https://nim-lang.org/docs/manual_experimental.html#concepts -- disruptek
15:12:38FromDiscord<--HA--> thanks @lqdev 👍
15:15:48*vicfred joined #nim
15:17:25FromDiscord<Kiloneie> https://youtu.be/bhH3Y6dTAPI
15:18:50FromDiscord<Kiloneie> With this video i have changed a bit how i record my videos, typing sections and talking sections are now separate(typing is -10 dB lowered and 400% sped up).
15:19:14FromDiscord<Kiloneie> Please tell me if you like this, want it more sped up, less, higher volume on the typing section etc.
15:22:20FromDiscord<lqdev> lookin' good
15:22:59FromDiscord<Kiloneie> Thanks 😛
15:24:47FromDiscord<benash> oh, interesting @disruptek
15:26:50FromDiscord<Kiloneie> Nintendo is not gonna copyright me for using Mario and Koopa right ?
15:27:04FromDiscord<Kiloneie> <.<, i heard a lot of stories...
15:35:01FromGitter<jorjun_twitter> If I wanted to GPIO / SPI with nim using the new linux ioctl calls do I need to rely on a c library for this?
15:35:40FromGitter<jorjun_twitter> https://www.acmesystems.it/libgpiod
15:36:13*waleee-cl joined #nim
15:40:41FromDiscord<Recruit_main707> nim profiler isnt writing anything to the profile_results.txt for some reason
15:42:18FromDiscord<Kiloneie> https://media.discordapp.net/attachments/371759389889003532/743494647518855168/wut.png
15:43:48FromDiscord<tomck> does nim have support for custom allocators? (i'm using the normal GC if that matters)
15:44:14FromDiscord<Recruit_main707> i think so, ye, you will have to deallocate yourself obv though
15:45:12disruptekyes.
15:45:51disrupteki mean, you can't suddenly have the default allocator replaced.
15:45:51disruptekbut you can perform your own alloc of whatever.
15:45:55FromDiscord<tomck> what if i just wanted to allocate a certain type inside a memory arena (like, implement my own heap with malloc/free), but i still wanted to use the nim gc?
15:46:18FromDiscord<Recruit_main707> you should be fine
15:46:21FromDiscord<tomck> so, i have a tree node type, can i just get nim to allocate all new instances of that through my own 'alloc/free' functions?
15:46:24FromDiscord<tomck> (if so, how?)
15:46:38FromDiscord<tomck> i do still want it to be GCed though
15:46:39FromDiscord<Recruit_main707> that probably wont work
15:46:53FromDiscord<tomck> i see, so if i want custom alloc i'll need manual alloc/free?
15:47:08disrupteksure.
15:47:20disruptekthe language can support scope-based allocators that /do/ replace the default allocator. it's just not implemented yet.
15:48:39FromDiscord<tomck> not scope based, it's still per-type
15:49:02FromDiscord<tomck> i just want it to allocate all entities of a certain type close together, since i typically walk the whole tree & tree nodes are small
15:49:18FromDiscord<tomck> (for good cache performance & fast copying of the whole tree)
15:49:48FromDiscord<tomck> definitely not possible whilst still using the gc?
15:50:43FromDiscord<lqdev> using a seq does exactly that
16:04:04disruptekdefinitely /is/ possible, as i indicated.
16:04:07disruptekpeople do it, and probably someone will chime in to provide an example.
16:04:22disrupteksorry, my internet is dogshit.
16:09:27leorize!repo fusion
16:09:27disbothttps://github.com/nim-lang/fusion -- 9fusion: 11Fusion is for now an idea about how to grow Nim's ecosystem without the pain points of more traditional approaches. 15 54⭐ 4🍴 7& 1 more...
16:09:33leorizecheckout fusion.pools
16:31:29*NimBot joined #nim
16:33:30federico3what's the benefit over stdlib?
16:33:49leorizestdlib staging
16:33:58federico3what's the benefit?
16:34:08leorizestaging ground?
16:34:16disruptekit's more exclusive because fewer people know about it.
16:34:26disruptekyou get to entertain bugs that others only dream of.
16:34:39leorizethings got merged under laxer terms and can be tested before introduction into the stdlib?
16:35:04FromDiscord<Clyybber> its not what it was originally intended/advertised to be
16:35:06disruptekit's first and foremost, a terrible idea. the implementation has proven to be even worse.
16:35:23federico3leorize: how is it better than a branch?
16:35:37*Sembei quit (Ping timeout: 264 seconds)
16:35:40*MyMind joined #nim
16:36:02leorizeit's a nimble package, it can be updated out-of-bound
16:36:10federico3https://github.com/nim-lang/RFCs/issues/173 is dead then :(
16:36:10disbotDeveloping Nim's stdlib and a Nim distribution
16:36:30disruptekfusion is araq's pet.
16:37:35FromDiscord<Clyybber> it should not be called fusion IMO
16:37:44FromDiscord<Clyybber> rather, experiments or something like that
16:37:58dom96it really shouldn't exist
16:38:11FromDiscord<Clyybber> and fusion should be the name for the list of packages that get bundled with the installer
16:38:13dom96just distribute a list of pinned packages if you really want
16:38:16dom96this fusion thing is strange
16:38:17FromDiscord<Clyybber> yeah
16:38:36FromDiscord<Clyybber> fusion should just be a preinit .nimble
16:39:17federico3Nim still does not solve the problem of having batteries included
16:39:28disruptekno, it's worse.
16:39:37disrupteknow we are testing software in the distribution.
16:43:30FromDiscord<Clyybber> IMO on the website there should be two download options, one that comes with a bunch of packages, and one that comes with nothing
16:43:50FromDiscord<Clyybber> the packages that should come with it could be the ones that the playground already provides
16:46:17*hnOsmium0001 joined #nim
16:57:14*superbia1 joined #nim
16:58:00*s4mu3lbk joined #nim
16:58:05dom96IMO we are not at that stage yet
16:58:18dom96and I'm skeptical about we ever will be
16:58:28dom96Our package manager should simply be good enough to make this unnecessary
16:59:33dom96s/about/about whether/
17:00:32*superbia quit (Ping timeout: 256 seconds)
17:00:59FromDiscord<Clyybber> it doesn't hurt to ship a few pkgs with nim by default though
17:01:06disruptekthat's not the problem araq is trying to solve.
17:01:17dom96it does hurt
17:01:28FromDiscord<Clyybber> how so?
17:01:29dom96each release takes twice as long
17:01:36FromDiscord<Clyybber> hmm ok
17:01:39disruptekhe's trying to satisfy those who can only use previously-sanctioned files.
17:02:12FromDiscord<Clyybber> so fusion is basically an semi-alive version of the graveyard
17:02:13FromDiscord<Clyybber> :p
17:10:21FromDiscord<Admin> hi
17:10:27FromDiscord<Admin> how do i get the users screen size ?
17:10:33FromDiscord<Admin> (edit) 'screen' => 'display'
17:12:43dom96depends on the platform
17:13:05FromDiscord<Admin> i need for both mac and windows
17:15:07FromDiscord<lqdev> you may be able to get the display info using GLFW or SDL
17:15:17FromDiscord<lqdev> it supports many platforms
17:15:26FromDiscord<lqdev> (edit) 'it supports' => 'they support'
17:16:07dom96yep, otherwise you'll need to use the WinAPI and macOS APIs
17:16:20dom96don't think we've got any Nim library that offers this functionality yet
17:16:38FromDiscord<Admin> any documentation url ?
17:17:32FromDiscord<lqdev> @Admin for GLFW: https://www.glfw.org/docs/latest/monitor_guide.html#monitor_modes↵for SDL: https://wiki.libsdl.org/SDL_GetDisplayMode?highlight=%28%5CbCategoryVideo%5Cb%29%7C%28CategoryEnum%29%7C%28CategoryStruct%29
17:17:41FromDiscord<lqdev> there are plenty of wrappers on nimble for both libs
17:18:02FromDiscord<lqdev> personally i can recommend nimgl or staticglfw for GLFW, and sdl2_nim for SDL2
17:18:12FromDiscord<lqdev> GLFW is more lightweight by the way
17:26:06*gogoprog quit (Read error: Connection reset by peer)
17:27:32*gogoprog joined #nim
17:30:20FromDiscord<Admin> @lqdev ok did that but geting an error that i need a pointer
17:30:25FromDiscord<Admin> and im kinda new to nim so dont understand how to fix
17:30:36FromDiscord<Admin> sent a code paste, see https://play.nim-lang.org/#ix=2u4x
17:30:48FromDiscord<Admin> sent a code paste, see https://play.nim-lang.org/#ix=2u4y
17:30:49FromDiscord<lqdev> `addr w, addr h`
17:31:19disruptek!repo frosty
17:31:20disbothttps://github.com/disruptek/frosty -- 9frosty: 11marshal native Nim objects via streams, sockets 15 9⭐ 0🍴
17:31:23disrupteknow supports case objs.
17:43:13FromDiscord<Clyybber> nice
17:43:44FromDiscord<kodkuce> anyone know how to fold all in vscode
17:44:38FromDiscord<kodkuce> what a dumb keybing CTRL+K+0
17:46:00FromDiscord<Kiloneie> Can you even fold in vs code? I havent found that yet.
17:46:33*abm quit (Quit: Leaving)
17:51:36FromDiscord<kodkuce> yep
17:52:02FromDiscord<kodkuce> i used mouse to click on > but now i can fold like pro with CTRL+K+0 xD
17:52:08FromDiscord<kodkuce> need to change this kaybing for sure
17:53:03FromDiscord<lqdev> damn chord keybinds in vscode are so annoying
17:53:14FromDiscord<lqdev> vim solves it wayy better
17:53:23FromDiscord<lqdev> you can release the initial keybind
17:53:41FromDiscord<lqdev> eg. ctrl+w [release ctrl and w] =
17:58:27*arecacea1 quit (Remote host closed the connection)
17:58:56*arecacea1 joined #nim
18:03:16*bung quit (Ping timeout: 256 seconds)
18:03:55FromDiscord<Clyybber> that sounds worse to me
18:04:33FromDiscord<lqdev> it's better
18:04:38FromDiscord<lqdev> because you don't have to hold ctrl
18:06:20FromDiscord<Clyybber> so you release ctrl and then within a certain time frame press w?
18:06:26FromDiscord<Clyybber> or you hold down w and release ctrl?
18:07:06FromDiscord<lqdev> no
18:07:09FromDiscord<lqdev> you press ctrl+w
18:07:12FromDiscord<lqdev> then you press =
18:07:14FromDiscord<lqdev> no timeframe
18:07:18FromDiscord<lqdev> it's just how vim works
18:07:26FromDiscord<lqdev> it adds ctrl+w to a buffer of sorts
18:07:40FromDiscord<lqdev> and awaits for a sub-command or something like that
18:07:46FromDiscord<lqdev> not sure about the exact terminology
18:07:56FromDiscord<Clyybber> oh, I see what you mean, I thought you were referring to ctrl+w itself
18:08:02*bung joined #nim
18:08:02FromDiscord<Clyybber> yeah, that makes sense
18:11:28*rockcavera quit (Remote host closed the connection)
18:15:47*bung quit (Ping timeout: 240 seconds)
18:29:53*bung joined #nim
18:34:01*bung quit (Ping timeout: 246 seconds)
18:36:38*bung joined #nim
18:37:49*Trustable joined #nim
18:41:01*bung quit (Ping timeout: 246 seconds)
18:46:47*bung joined #nim
18:49:48*endragor quit (Remote host closed the connection)
18:51:10*bung quit (Ping timeout: 246 seconds)
18:51:40*endragor joined #nim
18:54:51*bung joined #nim
18:56:52shashlickdisruptek: just saw your meow changes - don't need to check in the docs into the main branch
18:57:02*endragor quit (Ping timeout: 260 seconds)
18:57:08shashlickjust run `nimble docs --publish` and it will update the gh-pages branch
18:57:44shashlickyou need `pip install ghp-import` though
18:59:37*bung quit (Ping timeout: 264 seconds)
19:04:09*bung joined #nim
19:09:28FromDiscord<--HA--> I'm compiling for windows on linux using mingw. On my local pc it works as expected on a ubuntu 18.04 image where I want to setup automatic building the resulting file is missing its .exe extension. Easy to work around of course but I'm wondering why this happens.
19:10:35FromDiscord<--HA--> Can I pass the -o flag for output filename to the compiler through nimble?
19:12:50*gogoprog quit (Quit: WeeChat 2.8)
19:13:13*bung quit (Ping timeout: 246 seconds)
19:16:57Zevvdisruptek: dude your productiveness is making me jealous as hell
19:17:58*bung joined #nim
19:22:53*bung quit (Ping timeout: 265 seconds)
19:25:16FromDiscord<benash> sent a code paste, see https://play.nim-lang.org/#ix=2u52
19:25:30disruptekshashlick: eh i'm unlikely to fuck with python just to accomplish what i can do with the compiler.
19:25:36disruptekZevv: what did i do?
19:25:56FromDiscord<benash> sent a code paste, see https://play.nim-lang.org/#ix=2u53
19:26:05disrupteki've been watching john oliver for two days straight.
19:26:33disruptekand i deleted dust. 😣
19:26:43*bung joined #nim
19:27:10Zevvyou fixed object variants in frosty
19:27:17FromDiscord<Clyybber> what was dust?
19:27:21FromDiscord<Clyybber> a minimizer?
19:27:28disruptekyeah. i'm starting over on it.
19:27:41Zevvfor you are dust, and to dust you shall return
19:27:58disruptekobject variants had a couple really dump macro bugs.
19:28:05disrupteki guess i've learned something since i wrote it.
19:28:12disruptekdumb, too.
19:28:19ZevvI just use msgpack4nim
19:28:34disrupteki was using it in golden but... it's not for me.
19:28:43disruptekapparently, frosty is not for me, either. i don't use it yet.
19:28:47Zevvhaha
19:28:49disruptekbut zedeus says it works.
19:28:58FromDiscord<XxDiCaprioxX> How do I use choosenim? I installed and ran the bat. How do I place the nimble bin in the folder it should be?
19:29:03ZevvI was checking out frosty to see if I can make something channelish with it
19:29:24disruptekyou don't want frosty for that.
19:29:29disruptekour channels are going to be zero-copy.
19:30:03disruptekfrosty's goal is 1-copy, ie. to the write or from the read.
19:30:27Zevvsure; but not sure of zero-copy is always feasible
19:30:39shashlickdisruptek: you just have to type two commands
19:30:44Zevvif there are real threads under the hood
19:30:46disruptekthat's too many.
19:30:53FromDiscord<Clyybber> either way, frosty is serializing, why would you serialize something from in memory to in memory?
19:30:55disruptekZevv: it is, that's the whole point of what we're doing.
19:31:02disrupteklol
19:31:25*bung quit (Ping timeout: 264 seconds)
19:31:35*endragor joined #nim
19:31:35FromDiscord<XxDiCaprioxX> > How do I use choosenim? I installed and ran the bat. How do I place the nimble bin in the folder it should be?↵@XxDiCaprioxX
19:31:38FromDiscord<Clyybber> if you would want to do that you could skip the serializing and memcopy
19:31:46disruptekof course.
19:31:49disruptekthat's what channels does.
19:31:49Zevvdisruptek: sure, when you only keep your stuff in closures
19:32:03Zevvbut I want to be able to throw other stuff to other threads as well probably
19:32:08Zevvanyway, just looking around
19:32:22disruptekwe have this today with channels.
19:32:35Zevvsure. but these are kind of suckish.
19:32:56disruptekhow do you figure they are any different from what you're suggesting?
19:33:08ZevvI'm not suggesting anything, just looking around :)
19:33:33disruptekfrosty is serialization for the uncommon man.
19:33:53disruptekbut i have this idea about how, uh, /tubes/ are going to work with cps/csp.
19:34:00Zevvsure, because the common man would just serialize type T and deserializd it into type Q
19:34:07Zevv/tubes/ is cool. we keep that
19:34:29Zevvand I will consistently mistype them as /tubers/
19:34:55disruptektubers?
19:34:57Zevvno, really, tubes is a pretty cool name
19:35:09Zevvyeah I had this friend with a company he called "tubers".
19:35:09disruptekit's that, or.. /pubes/
19:35:18*bung joined #nim
19:35:32Zevvbecause "the internet is made of tubes", or something
19:35:45disruptekit's "just a series of tubes".
19:35:58*endragor quit (Ping timeout: 246 seconds)
19:36:00Zevvyeah right that one
19:36:35disrupteki'm not sure tubes is the right idea, because i'm pretty sure we'll have multi-producer multi-consumer naturally.
19:36:39Zevvhe forgot to just look up "tubers" on google and get all the images of nasty underground growth
19:37:02FromDiscord<Doof Doof> So I knew there was 'var', 'ref', 'let', but what is this thing that is neither of those? for example `proc example(value:int)`?↵I want to use an object's field inside of a procedure that takes a var but nim aint having that right now . . .
19:37:18disruptekwhy not?
19:37:53FromDiscord<Doof Doof> I would prefer not having to use `var ` right before calling a procedure that takes a var value
19:38:09disruptekwhat?
19:38:50FromDiscord<Doof Doof> sent a code paste, see https://play.nim-lang.org/#ix=2u5b
19:38:52disruptekdon't have your procedure return anything if you don't want to retain a value somewhere?
19:39:11FromDiscord<Doof Doof> That's not what I meant
19:39:16disruptekprocedureThatTakesAVar(someObj.val)
19:39:24FromDiscord<Doof Doof> ooh
19:40:14FromDiscord<Doof Doof> No it still thinks they're different types
19:40:27FromDiscord<Doof Doof> procedure type is 'var Type' and object type is just 'Type'
19:40:49disruptekeither change your procedure or change your value.
19:40:57disruptekby design, one cannot mutate immutable values.
19:41:00disruptekthis is a nice feature.
19:41:35FromDiscord<Doof Doof> It's not immutable, it's just a field of a mutable object?
19:42:02disruptekshow me the real procdef.
19:42:13*bung quit (Ping timeout: 264 seconds)
19:42:20FromDiscord<Doof Doof> Sure
19:43:43disrupteki don't need the body; just paste the prototype here.
19:43:54disruptekso i can tell you to remove the `var` from the argument...
19:44:14FromDiscord<Doof Doof> sent a code paste, see https://play.nim-lang.org/#ix=2u5e
19:44:23disruptekremove the `var` from the argument.
19:44:54FromDiscord<Doof Doof> Okay, then what does that do? Because I assumed I'll be copying the shader if I remove var?
19:45:20FromDiscord<Clyybber> dont use var to elide copies
19:45:20disruptekit'll be passed by reference if it's any larger than 3 pointers.
19:45:55FromDiscord<Doof Doof> So I have to return the result huh
19:46:18*bung joined #nim
19:47:17disruptekyou don't have to.
19:48:07FromDiscord<Doof Doof> You're saying it's conditionally passed by reference, therefore I'd be working on a different structure unless I change the value I'm passing in to be a var again or something like a reference I guess
19:48:39disruptekis the structure a ref/ptr?
19:48:45disruptekis it larger than 3 ptrs?
19:49:09disruptekif not, why isn't it a mutable value?
19:49:16disruptek...if you want to mutate it...
19:49:18FromDiscord<Clyybber> you can also enforce it by using {.byref.} on the type
19:49:32*tane joined #nim
19:49:58FromDiscord<Doof Doof> disruptek I want it to be a mutable value, but how can I make it a mutable value directly on the object definition without making it a ref/ptr?
19:50:12FromDiscord<Doof Doof> Thanks, clybber. That'll be nice to know in the future
19:50:29disruptekthe object itself must be mutable. then all fields are mutable as well.
19:50:40*bung quit (Ping timeout: 246 seconds)
19:50:48FromDiscord<Clyybber> he wants to have a `type = var object ...`
19:51:05FromDiscord<Clyybber> but why would you want that
19:51:08FromDiscord<Doof Doof> Sounds right
19:51:09*awe001 joined #nim
19:51:20FromDiscord<Recruit_main707> var == ptr in disguise
19:51:23FromDiscord<Clyybber> mutability is not attached to the type itself
19:51:27disruptekmutability is a property of the instance, not the type.
19:51:37FromDiscord<Clyybber> @Doof Doof I guess you want that to not have to wrtie var everytime right?
19:51:53disruptekuse a concept.
19:51:56disruptek~concepts
19:51:56disbotconcepts: 11user-defined type classes; documented in the experimental section of the manual: https://nim-lang.org/docs/manual_experimental.html#concepts -- disruptek
19:52:02FromDiscord<Clyybber> nah
19:52:05FromDiscord<Clyybber> use using
19:52:12FromDiscord<Recruit_main707> i think he wants to work on the stack exclusively
19:52:29disruptekugh, prefer explicit typechecking to implicit syntax.
19:53:01*awe00 quit (Ping timeout: 264 seconds)
19:53:22*bung joined #nim
19:53:25disruptekZevv: where are we with cps?
19:53:52FromDiscord<Doof Doof> Well, what's really happening is I was just testing things out and had a lot of `var field:..` at the top of the main file. I'm in the progress of shifting those into objects instead and noticed I have to start changing the procedures I wrote earlier because they're not 'var' anymore.
19:53:54disruptekis "internal error: environment misses: i" what you get?
19:54:26FromDiscord<Clyybber> @Recruit_main707 var is not needed for that
19:54:34FromDiscord<Clyybber> in fact its completely unrelated
19:54:43disruptekclyybber: how come your compiler is so broken?
19:54:47FromDiscord<Clyybber> with or without var, an object is on the stack
19:54:59disruptekHOW COME
19:54:59FromDiscord<Clyybber> disruptek: *mine*??
19:55:03FromDiscord<Clyybber> HOW COME
19:55:22disruptekall i see is clyyber all over my screen.
19:55:29FromDiscord<Clyybber> lol
19:55:38FromDiscord<Clyybber> clyybber commits be ballin
19:55:51FromDiscord<Clyybber> clyybber variables
19:55:53FromDiscord<Clyybber> clyybber bugs
19:56:46FromDiscord<--HA--> @dom96 when I run a nimble build with -d:mingw on my debian machine I get a .exe but on ubuntu it compiles fine but the .exe extension is missing. Have you run into this before?
19:57:05Zevvdisruptek: i'm about to go on holidays for two weeks
19:57:11disruptekwut
19:57:18Zevvill be sitting on a little island on the north of the netherlands
19:57:25FromDiscord<Clyybber> nice
19:57:30FromDiscord<Clyybber> watching the netherlands flood
19:57:30disruptekyou're kidding me.
19:57:36Zevvnope
19:57:46FromDiscord<Clyybber> he calls it holydays but really he's escaping
19:57:46disruptekhave i mentioned lately that i hate you?
19:57:48Zevvso I'll have a lot of time to work on this stuff
19:57:49FromDiscord<Recruit_main707> > var is not needed for that↵i know, i just felt that might have been relevant for him (turns out it wasnt though :P )
19:57:53Zevvwait, what?
19:57:56FromDiscord<Clyybber> Zevv: Oooh
19:57:56Zevvwhat did I do?
19:58:02disrupteklol you can't work while on holiday.
19:58:04FromDiscord<Clyybber> he thought cps holidays
19:58:15disruptekthe whole point is to get away from this garbage.
19:58:20Zevvwell maybe I should, in the light of these new revelations
19:58:34disrupteknew revelations?
19:58:46Zevvwell, with you hating me, and all
19:58:51disruptekoh, right.
19:58:56Zevvi thought we had somethin special going on, you and me
19:58:57Zevvbut here we are
19:59:05disruptekyou're in good company; i hate most humans.
19:59:19Zevvone should. its the sanest thing to do
19:59:23disruptekpart of being an incel is not letting anyone close to you.
19:59:37Zevvanyway, Im not sure what the status is, I packed my laptop already
19:59:57disrupteki think clyybber is probably blocking us, as ever.
20:00:03FromDiscord<Clyybber> https://i.redd.it/tf7wvy7yjaa51.jpg
20:00:21disrupteklol
20:00:29FromDiscord<Clyybber> they even renamed our genes
20:00:35disrupteki know, i love that.
20:01:52Zevvi must say the transition to typed was less painful than i thought it to be
20:02:05*bung quit (Ping timeout: 240 seconds)
20:02:11FromDiscord<Clyybber> oh btw typed
20:02:16Zevvbut i also must say the transition to typed was more painful than i thought it to be
20:02:21FromDiscord<Clyybber> I think we might not actually need attach symbols
20:02:35Zevvelaborate
20:02:52FromDiscord<Clyybber> because when the ast gets typed stuff like when random: should already be eliminated
20:02:53FromDiscord<Clyybber> I think
20:04:00FromDiscord<Clyybber> And explicitly attaching symbols might be too coarse grained, since the user could just chip chop the typed ast and pick whatever he wants and put it in the output
20:04:41FromDiscord<Clyybber> Zevv: To fix the redefinition bug
20:05:53*bung joined #nim
20:06:02Zevvright!
20:06:13disruptekZevv: you are the guy to write the rewrite machinery. i am happy to use it to impl all the rewrites.
20:06:16FromDiscord<Clyybber> now I gotta think about static blocks
20:06:35disruptekit's probably a state machine.
20:08:36disruptekyou know why we have the current bug?
20:09:02disruptekbecause we redefine `i` but we need to go through and zotz out all of the `i` symbols and turn them into idents.
20:09:56disruptekthis is one of our rewrite stages.
20:10:55FromDiscord<Clyybber> heh
20:10:56FromDiscord<Clyybber> it just works
20:11:01Zevvhuh why me
20:11:06FromDiscord<Clyybber> static blocks get turned into discard
20:11:11Zevvi thought i just complain and you write?
20:11:18disruptekyou have an intuition when it comes to elegance.
20:11:24Zevvbwaaha
20:11:30Zevvthats what she said
20:11:42disruptekshe was right.
20:11:45Zevvwasnt it me who gave up on this
20:12:17disruptekit was you who started it.
20:12:35Zevvjust to spark your interest
20:13:09*superbia1 quit (Quit: WeeChat 2.9)
20:13:19Zevvanyway, i was hoping to get the rewriting done with some pattern matching mechanism
20:13:26Zevvi tried that a few times, but failed
20:13:36FromDiscord<Clyybber> pattern matching, fancy words
20:13:41Zevvthe cpc paperuses these virtual gotos
20:13:45Zevvbut actually that kind of sucks
20:13:46*bung quit (Ping timeout: 246 seconds)
20:14:01FromDiscord<Clyybber> the current impl is about 1000 lines right?
20:14:08FromDiscord<Clyybber> seems good to me
20:14:08Zevvso i tried to go there recursively, but that failed. if it was that simple, the cpc people probablywould have used that
20:14:21Zevvour guess is that we should be able to do it with half of that
20:14:22disruptekwe can use whatever we want; inside this process, the ast is just data to us.
20:14:43FromDiscord<Clyybber> btw, you talked yesterday about not being able to jield ?
20:14:45FromDiscord<Clyybber> why not?
20:14:59disruptekwe can jield.
20:15:01Zevva true disruptek never jields
20:15:10FromDiscord<Clyybber> with typed I mean
20:15:10Zevvdisruptek: you still didnt show me how
20:15:19disruptekwe're already jielding in typed.
20:15:29Zevvare you passing the continuation then?
20:15:45disruptekoh i forgot.
20:15:45Zevvlast time i looked we didnt detect it as a cpc cal
20:15:48disruptekyeah.
20:15:50disruptekyou're right.
20:15:51Zevvand just called the fake jield
20:16:05Zevvanyway, im again off to bed early. worm and stuff
20:16:11disruptekaight, peace.
20:16:18FromDiscord<Clyybber> what do you guys have with worms
20:16:22FromDiscord<Clyybber> gn8
20:16:26Zevvdont go there
20:16:49disruptekwe can tag cps stuff using cpsMagic and cps so that subsequent typed interp can grok it as cps.
20:16:52FromDiscord<Clyybber> i'm gonna find the gobi worm
20:19:04*bung joined #nim
20:19:53FromDiscord<Clyybber> lol
20:20:00FromDiscord<Clyybber> disruptek: Wonna see something fun
20:20:04FromDiscord<Clyybber> ?
20:20:13disruptekis it x-rated?
20:20:17FromDiscord<Clyybber> nah
20:20:23FromDiscord<Clyybber> unless you get off compiler bugs
20:20:33disruptekof course.
20:20:52FromDiscord<Clyybber> !eval echo static: 1 or 0
20:20:55NimBotstatic1
20:20:58FromDiscord<Doof Doof> Clyybber if mutability isn't a part of an object definition then what option is there for transitioning a whole bunch of things that were once used as var into an object? Do I need to make the fields all ref now, or make the object itself a ref, or am I stuck just having to set a var to the object field when I want to use it like one?
20:21:11disruptekugh.
20:21:18FromDiscord<Clyybber> you never set var to an object field
20:21:22FromDiscord<Clyybber> disruptek: Fun right?
20:21:43disrupteki don't even.
20:21:49FromDiscord<Doof Doof> I mean var a = obj.a - never do that?
20:22:02FromDiscord<Clyybber> I don't understand what you want to do
20:22:06FromDiscord<Doof Doof> Alright
20:22:09disruptekit's $static[bool](1) i guess.
20:22:28*liblq-dev joined #nim
20:22:40disrupteksomehow not $bool.1 though. what about 2 or 0? 0 or 2?
20:22:59FromDiscord<Doof Doof> I mean if I have a number of procedures that take a var of a specific type I literally can't directly use a class field with it. I want to though.
20:23:15disruptekyou can.
20:23:28disrupteklook, chucklehead, if you have the object instance in a var, it's a var.
20:23:33disruptekif it's in a let variable, it's not.
20:23:44*bung quit (Ping timeout: 256 seconds)
20:23:53FromDiscord<Doof Doof> Then something's broken and I'm doing nothing wrong
20:23:54disruptekalso, nim doesn't have classes. 😉
20:24:02FromDiscord<Doof Doof> Sure
20:24:06disruptekshow us.
20:24:26*Jjp137 quit (Quit: Leaving)
20:24:35disrupteki promise you that you aren't doing anything novel here.
20:25:26FromDiscord<Doof Doof> So is your answer to set a var to an instance's field?
20:25:34disrupteknope.
20:25:37FromDiscord<Clyybber> why would you want that
20:25:43FromDiscord<Clyybber> if you modify the variable then
20:25:48FromDiscord<Clyybber> its not gonna modify the object
20:26:28*Trustable quit (Remote host closed the connection)
20:26:37disruptekvar x = MyObjectType(fieldA: 1); someProcThatTakesVar(x.fieldA)
20:27:18FromDiscord<Doof Doof> Okay yeah there's what I'm doing and it didn't work. I'll be a second to give a better example.
20:27:40disruptekwell, it works for the rest of us, so i'd like to see your example.
20:28:02*bung joined #nim
20:30:06*rockcavera joined #nim
20:35:43FromDiscord<Doof Doof> lmao please don't continue to call me chucklehead but you're right
20:35:55disruptekweird.
20:37:56FromDiscord<Doof Doof> I didn't realize my issue was propagating from one level above what I was thinking was the problem - but what you wrote above made me realize maybe it's not the procedure I was using after all
20:38:05disruptekindeed.
20:39:06disruptekit's a little tricky at first, but it'll click for you.
20:39:39disruptekif it doesn't, well, there's always bagging groceries down at Safeway.
20:39:59disrupteki've applied twice and i'm hoping to hear before the end of the month.
20:40:40*audiofile joined #nim
20:41:06*bung quit (Ping timeout: 260 seconds)
20:41:21FromDiscord<Doof Doof> Lol sorry for the confusion everyone but thanks for the help!
20:41:30disruptekglad you got it working.
20:41:31FromDiscord<Doof Doof> I'll skip Safeway for now 🤣
20:43:15*bung joined #nim
20:47:23*bung quit (Ping timeout: 240 seconds)
20:53:05*bung joined #nim
20:57:44*bung quit (Ping timeout: 256 seconds)
21:00:13FromDiscord<dom96> > @dom96 when I run a nimble build with -d:mingw on my debian machine I get a .exe but on ubuntu it compiles fine but the .exe extension is missing. Have you run into this before?↵@--HA-- `nim` decides whether to apply the extension or not AFAIK
21:00:20*bung joined #nim
21:01:47FromDiscord<--HA--> @dom96 I see, thank you. I just put a `mv` in there for now 😉
21:10:40*Vladar quit (Ping timeout: 265 seconds)
21:11:17*Vladar joined #nim
21:12:20*Vladar quit (Client Quit)
21:20:59*awe001 quit (Ping timeout: 240 seconds)
21:44:09*lritter quit (Remote host closed the connection)
21:49:03*awe001 joined #nim
22:04:02*bung quit (Ping timeout: 256 seconds)
22:04:19*liblq-dev quit (Quit: WeeChat 2.9)
22:05:21*tane quit (Quit: Leaving)
22:09:41*bung joined #nim
22:11:58disruptekwearing pants doesn't make it any faster.
22:12:49disruptekactually, i think going commando is quickest.
22:14:28*bung quit (Ping timeout: 256 seconds)
22:14:57*krux02 quit (Remote host closed the connection)
22:19:39*bung joined #nim
22:23:20FromDiscord<Recruit_main707> Lmfao is it also called going commando there?
22:24:14*bung quit (Ping timeout: 260 seconds)
22:26:51*bung joined #nim
22:34:45*bung quit (Ping timeout: 240 seconds)
22:36:10*bung joined #nim
22:38:09bunghey
22:41:39*Jjp137 joined #nim
22:59:48*solitudesf quit (Ping timeout: 256 seconds)
23:07:05*s4mu3lbk quit (Ping timeout: 240 seconds)
23:15:30FromDiscord<benash> sent a code paste, see https://play.nim-lang.org/#ix=2u66
23:16:33FromDiscord<benash> When I installed the C library, I noticed it generated a `.a` file (but no `.dylib` file) in `/usr/local/lib`
23:16:53*tiorock joined #nim
23:16:54*tiorock quit (Changing host)
23:16:54*tiorock joined #nim
23:16:54*rockcavera quit (Killed (orwell.freenode.net (Nickname regained by services)))
23:16:54*tiorock is now known as rockcavera
23:18:24FromDiscord<Rika> .a means that it's statically compiled into the binary so there wouldnt be a dylib
23:24:49*awe001 quit (Quit: WeeChat 2.9)
23:32:19*Jjp137 quit (Quit: Leaving)
23:38:02FromDiscord<benash> @Rika OK, so I should be ok specifying `header` and not `dynlib`?
23:38:25FromDiscord<Yardanico> yes, and you should link to that .a file
23:38:42FromDiscord<Yardanico> actually you don't really to specify the header then
23:43:27FromDiscord<SeanOMik> Is there a way that I could convert a 16 digit number to string with padding?
23:43:46FromDiscord<SeanOMik> I know I could do it like this in C++:```cpp↵std::stringstream stream;↵stream << std::setw(16) << std::setfill('0') << std::hex << in[0];```
23:43:55FromDiscord<SeanOMik> (edit) 'number' => 'hexadecimal'
23:44:04FromDiscord<SeanOMik> But I don't know how to in Nim
23:44:06disrupteksee the align proc in the strutils module.
23:44:25FromDiscord<SeanOMik> Okay I'll take a look at that thanks
23:45:19FromDiscord<SeanOMik> How could I convert a hexadecimal to a string?
23:45:31FromDiscord<SeanOMik> I want it in hex format
23:45:59disrupteksee the toHex proc in the strutils module.
23:46:03FromDiscord<SeanOMik> Oh
23:46:22FromDiscord<SeanOMik> I should of had just scrolled down
23:46:25FromDiscord<SeanOMik> Well thanks!
23:46:30disrupteksure thing.
23:47:02Yardanicoyou don't even need align with toHex btw
23:47:14FromDiscord<SeanOMik> Yeah I just saw that
23:47:21YardanicotoHex itself has an overload with len for specifying length of the str
23:47:40FromDiscord<SeanOMik> Okay cool
23:47:49FromDiscord<SeanOMik> I was gonna ask questions about it
23:47:54FromDiscord<SeanOMik> Thanks
23:51:26FromDiscord<benash> I think I got it: `nim c --passL:/path/to/lib.a . . .`