<< 04-06-2020 >>

00:00:01FromDiscord<Elegant Beef> Speaking of leorize i dont know how to include the execve as when i try to include it says it's already included
00:00:19leorize[m]execve is in posix.nim
00:00:25FromDiscord<Elegant Beef> ah
00:02:18PrestigeHm it looks like the xlib wrappers aren't using the importc or header pragmas, just cdecl
00:03:48FromDiscord<Elegant Beef> So correct me if im wrong leo, but seems it's↵openpt ->grantPt->unlockPt->openSlave... then magic
00:03:51Prestigeor libx11.. need to figure out how to find pragma definitions and see what they are doing
00:04:20FromDiscord<Elegant Beef> https://nim-lang.org/docs/manual.html#pragmas
00:04:29Prestigeah they have a file for it, found it
00:07:50FromDiscord<Elegant Beef> I wonder if i now have the knowledge i can make sense of ST
00:19:11*couven92 quit (Ping timeout: 265 seconds)
00:23:13FromDiscord<lex> hi
00:23:16FromDiscord<lex> how do I format this correctly
00:23:19FromDiscord<lex> ```nim↵ let f = open("connctl.json", fmWrite)↵ write(f, fmt"{\n\t"name": {name},\n\t"author": {author}\n}")```
00:23:24FromDiscord<lex> the uhm
00:23:25FromDiscord<lex> linter
00:23:26FromDiscord<lex> isnt very happy
00:23:28skrylar[m]are we keeping effects tracking around?
00:23:47FromDiscord<lex> wait what
00:25:22skrylar[m]someone was talking about how low level languages "can't be sandboxed" and i was pointing out with the effects system you actually kind of can, by just having the compiler deny the use of functions not marked as safe
00:26:19FromDiscord<lex> ah sorry
00:27:05FromDiscord<Elegant Beef> I mean i dont even see what you're trying to od
00:27:34FromDiscord<Elegant Beef> You know the json module has nice operators to convert from json to string
00:29:39FromDiscord<Elegant Beef> @lex https://play.nim-lang.org/#ix=2oe2
00:30:36FromDiscord<lex> oh cheers
00:33:28FromDiscord<lex> anyway I can get coloured terminal output?
00:33:58*FromDiscord quit (Remote host closed the connection)
00:34:14*FromDiscord joined #nim
00:41:51FromDiscord<lex> what if i only want part of the text to be coloured?
00:42:17FromDiscord<Zed> then have 2 different print calls
00:42:27FromDiscord<lex> should i use stdout
00:42:32FromDiscord<lex> instead of echo
00:42:34FromDiscord<Zed> yes
00:42:36FromDiscord<lex> ok thank
00:42:45FromDiscord<Zed> stdout.writeLine(string here)
00:42:46FromDiscord<lex> sorry im new to nim
00:43:26FromDiscord<Zed> no problem, enjoy!
00:43:32FromDiscord<lex> aye, I am haha
00:43:42FromDiscord<lex> I used to write typescript before, nowadays idk
00:43:53FromDiscord<lex> I wanna get away from interpreted languages. finding nim a bit difficult because i dont know where anything is
00:43:56FromDiscord<lex> but im getting there
00:44:30FromDiscord<Elegant Beef> I mean you can use echo just do it line by line
00:44:36FromDiscord<Zed> make sure you read through the nim tutorials on the website, it explains a lot of things
00:44:54FromDiscord<lex> proc writeStyled(txt: string; style: set[Style] = {styleBright}) {...}
00:44:59FromDiscord<lex> is this what i use for the colours
00:45:02FromDiscord<lex> or is that styles
00:45:10FromDiscord<Elegant Beef> That's styles
00:45:20FromDiscord<Elegant Beef> Dim/bold/ what ever in ansiC
00:45:46FromDiscord<Elegant Beef> I'd bodge it so i dont know the best way to suggest what you want
00:46:08FromDiscord<lex> my string is sometihng along the lines of
00:46:15FromDiscord<lex> ERROR: Blah blah...
00:46:26FromDiscord<lex> ERROR: I want to be bold and in red
00:46:26FromDiscord<Elegant Beef> And you just want error red?
00:46:41FromDiscord<lex> yeup
00:47:21FromDiscord<Zed> maybe write a function that takes your normal string and adds error onto it in whatever colour you want
00:47:59FromDiscord<lex> yeah could do
00:48:17FromDiscord<Zed> eg: `proc printInfo(input: string, infoType:int) `
00:48:25FromDiscord<Zed> and have a case for infoType
00:51:20*krux02_ quit (Remote host closed the connection)
00:52:01FromDiscord<Elegant Beef> If you want the exact same behaviour everywhere i'd just do this↵https://play.nim-lang.org/#ix=2oe4
00:52:09FromDiscord<Elegant Beef> writeStyled nicely doesnt newline
00:52:16FromDiscord<Elegant Beef> So echo is positioned where it needs to
00:53:11FromDiscord<Elegant Beef> Ah
00:53:15*tiorock joined #nim
00:53:15*tiorock quit (Changing host)
00:53:15*tiorock joined #nim
00:53:15*rockcavera quit (Killed (hitchcock.freenode.net (Nickname regained by services)))
00:53:15*tiorock is now known as rockcavera
00:53:16FromDiscord<Elegant Beef> Actually the defaullt style is bold
00:53:24FromDiscord<Elegant Beef> Forgot that bright = bold
00:54:04FromDiscord<lex> lmao
00:54:05FromDiscord<lex> yeah
00:54:07FromDiscord<lex> cheers man
01:04:49*theelous3 quit (Read error: Connection reset by peer)
01:06:27*konvertex quit (Ping timeout: 256 seconds)
01:12:22*chemist69 quit (Ping timeout: 260 seconds)
01:14:12*chemist69 joined #nim
01:28:06*tiorock joined #nim
01:28:06*rockcavera is now known as Guest81196
01:28:06*Guest81196 quit (Killed (tolkien.freenode.net (Nickname regained by services)))
01:28:06*tiorock is now known as rockcavera
01:49:17*Tlanger joined #nim
01:51:59*Tongir quit (Ping timeout: 265 seconds)
02:21:56*muffindrake quit (Ping timeout: 256 seconds)
02:24:01*muffindrake joined #nim
02:26:56*pbb quit (Remote host closed the connection)
02:28:13*pbb joined #nim
02:39:46*Tongir joined #nim
02:40:20*FromDiscord quit (Remote host closed the connection)
02:40:37*FromDiscord joined #nim
02:41:54*Tlanger quit (Ping timeout: 240 seconds)
03:10:58*rockcavera quit (Remote host closed the connection)
03:12:23*chemist69 quit (Ping timeout: 246 seconds)
03:13:36*chemist69 joined #nim
03:23:37*pbb quit (Remote host closed the connection)
03:24:15FromDiscord<Elegant Beef> This is interesting↵https://play.nim-lang.org/#ix=2oel
03:24:48FromDiscord<Rika> what the heck is that indent tho
03:24:52*pbb joined #nim
03:25:12FromDiscord<Elegant Beef> Didnt copy properly from my ide
03:27:04FromDiscord<Elegant Beef> Im just trying to figure out how it can call forking only once but then can call both of the following echos
03:27:54FromDiscord<Elegant Beef> I guess it's probably the dup2 causing that behaviour
03:40:25*zacharycarter quit (Ping timeout: 264 seconds)
04:02:19*sz0 quit (Quit: Connection closed for inactivity)
04:05:43*opal quit (Ping timeout: 240 seconds)
04:06:01*supakeen quit (Quit: WeeChat 2.8)
04:06:43*supakeen joined #nim
04:11:25Prestigehm I don't know enough c to create this xft wrapper lol. I'm kind of surprised there isn't a tool to create wrappers from header files
04:12:04*waleee-cl quit (Quit: Connection closed for inactivity)
04:16:19bungc2nim doesnot work for you?
04:20:08PrestigeDidn't know about it, trying it now.. looks like I'll have to do some tweaking
04:20:44*opal joined #nim
04:23:40PrestigeYeah it's complaining about an expected ; but I'm not sure why. Hm
04:24:09*narimiran joined #nim
04:28:24FromDiscord<Elegant Beef> What header file are you wrapping?
04:28:28PrestigeXft.h
04:29:11FromDiscord<Elegant Beef> Interestingly i dont have that one
04:29:47FromDiscord<Elegant Beef> ah
04:29:50PrestigeI think it doesnt come with xlib
04:29:56FromDiscord<Elegant Beef> Yea it doesnt
04:30:00FromDiscord<Elegant Beef> it's from libxft-dev
04:30:06FromDiscord<Elegant Beef> atleast on ubuntu
04:31:33FromDiscord<Elegant Beef> Ah that seems like it'll be rather simple to wrap
04:32:01Prestigeyeah? I don't know C, so yeah
04:32:08FromDiscord<Elegant Beef> I dont either
04:32:11FromDiscord<Elegant Beef> :p
04:32:38Prestigewhat will you do about FcCharSet?
04:32:45FromDiscord<Elegant Beef> "will"
04:33:53Prestigesince it's part of another lib
04:33:58Prestigeappears to just be a typedef
04:34:30FromDiscord<Elegant Beef> Like i said i dont know C but i'd assume you either import that as a nim type
04:34:40FromDiscord<Elegant Beef> or just make it have the same fields
04:34:48FromDiscord<Elegant Beef> Depending on what it needs
04:36:17FromDiscord<Elegant Beef> My extent of making a wrapper is <https://github.com/beef331/nim_pty/blob/master/src/nim_pty.nim>
04:36:40FromDiscord<Elegant Beef> Not exactly a super difficult thing there
04:55:18PrestigeI was hesitant to just drop in dummy types since they belong to another lib but I'll see what they say when I submit a pr I suppose
05:30:05*lritter joined #nim
05:44:09*silvernode joined #nim
06:04:39*kenran joined #nim
06:08:27*endragor quit (Remote host closed the connection)
06:23:03FromDiscord<willyboar> good morning everyone!
06:24:03FromDiscord<Elegant Beef> Hello
06:24:45*letto quit (Quit: Konversation terminated!)
06:26:39*letto joined #nim
06:27:00*adnan338 quit (Read error: Connection reset by peer)
06:31:02silvernodeSo I am trying to create a proc that generates a menu list of options based on a set of strings which are passed as parameters but I am not entirely sure how to go about it.
06:31:14silvernodeI'll send an example in a sec
06:31:35PrestigeMenu list?
06:37:11silvernodeFinishing my example and you'll see
06:40:26silvernodePrestige, https://play.nim-lang.org/#ix=2oeJ
06:40:56*PMunch joined #nim
06:41:58*endragor joined #nim
06:42:03PrestigeOh, that kind of menu
06:42:47silvernodeThat example code is just one way I thought of doing it. I might want to use a seq instead of an array in the params of the proc but I figured I should make an array since the options won't need to be changed after created
06:44:05*terps joined #nim
06:44:35Prestigehttps://play.nim-lang.org/#ix=2oeK
06:45:03PrestigeYou don't need to populate another array or sequence if you're passing one into the proc
06:45:44PrestigeThen you'll need to read a number from stdin and use that to get an element from the array
06:46:10silvernodePrestige, yeah that was another thing I thought about. So now I just need to list the index number and the items
06:46:46PrestigeFor that you can just for i, e in opts: I believe
06:46:46silvernodewell the menu won't be created by the user, it's just for internal use
06:47:35silvernodedamn, I'm out of time. Gotta clock into work.
06:47:43silvernodePrestige, thanks for the help!
06:47:54PrestigeNo problem, have a good one
06:47:58silvernodecheers!
06:50:36FromDiscord<Elegant Beef> Then there is me that'd do something silly like↵https://play.nim-lang.org/#ix=2oeJ
06:52:27*silvernode quit (Ping timeout: 260 seconds)
06:52:37FromDiscord<Elegant Beef> ll it didnt save
06:52:55FromDiscord<Zed> or this↵https://play.nim-lang.org/#ix=2oeO
06:55:21FromDiscord<Zed> PMunch: is there anyway we can change nim-playgrounds to change the id tag after there has been an edit on a different device?
06:55:51PMunchOn a different device?
06:57:49PMunchBut I doubt it, the playground uses ix.io for storing the snippets, and it has an explicit rule against automated pastes. TBH I wasn't completely sure if having it as a button was allowed, but I figured it was fine as it was a user-triggered action.
06:57:56FromDiscord<Zed> using cookies or something, like my post above with the playground, more times then i can count i've opened up a playground made an edit only for it to not have saved and reverted back to the old edit
06:58:21PMunchBy the way you don't need repr to turn an int into a string. Just use $ which is the toString operator
06:58:44FromDiscord<Zed> yeah i know, just habit
06:58:57FromDiscord<Elegant Beef> There we go
06:58:58FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2oeP
06:59:02FromDiscord<Elegant Beef> Rewrote it cause why not
06:59:32PMunchZed, and instead of stdout.writeLine you can just use echo
06:59:42FromDiscord<Zed> Beef have you got some beef with red??
06:59:48FromDiscord<Zed> yeah i know
06:59:51FromDiscord<Elegant Beef> Totally not
07:00:54FromDiscord<Zed> ok...
07:03:30*dddddd quit (Ping timeout: 260 seconds)
07:04:20PrestigeBeef yeah that's what i was saying to do
07:04:31PrestigeOn phone atm though
07:06:00FromDiscord<Elegant Beef> You didnt once do the event based stuff 😛
07:06:07FromDiscord<Elegant Beef> (edit) 'You didnt once ... do' => 'You didnt oncesay to'
07:07:09FromDiscord<Shucks> Got another magic challenge. Now im trying to split a type (int, float, string) into its bytes
07:07:54PrestigeMeant your earlier paste, didn't see your event stuff
07:08:15PrestigeDon't know what he's building, didn't want to recommend an architecture
07:08:26FromDiscord<Elegant Beef> Hey i always say event based 😄
07:08:40FromDiscord<Elegant Beef> For a string you'll want a string stream
07:08:46PMunch@Yardanico, I've found a bug in the IRC bot edit stuff
07:09:19FromDiscord<Elegant Beef> For an int you can use bit wise ops
07:09:21FromDiscord<Shucks> Im still wondering why https://forum.nim-lang.org/t/4594 doesn't works for a int32 for example
07:11:48FromDiscord<Elegant Beef> Which one?
07:11:59PMunchShucks, what do you mean? Should work just fine for an int32
07:12:10PMunchAssuming you change it from 0..7 to 0..3 of course
07:12:50FromDiscord<Elegant Beef> Yea it does work
07:12:53FromDiscord<Elegant Beef> Just tested it
07:13:05FromDiscord<Shucks> Yea, I guess its the reason because im not using arrays.
07:14:23Araquse more arrays, they are nice
07:14:43FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2oeQ
07:14:55FromDiscord<Elegant Beef> There's the issue you're facing
07:21:27FromDiscord<Shucks> I see. Im basically trying to read bytes from a process. But I guess I can't use arrays here since the size isn't known at the compile time.
07:21:27FromDiscord<Shucks> https://play.nim-lang.org/#ix=2oeR
07:26:01*Kaivo quit (Ping timeout: 264 seconds)
07:27:39FromDiscord<Elegant Beef> https://play.nim-lang.org/#ix=2oeS
07:27:45FromDiscord<Elegant Beef> If you want to read each byte from a string
07:28:15*Kaivo joined #nim
07:29:30PMunch@Shucks, what is the & here: cast[pointer](&data[0])
07:32:04PMunchI mean this should work fine: https://play.nim-lang.org/#ix=2oeW
07:36:56FromDiscord<Shucks> Yea it works fine already. I just want to convert that bytes into its "real" types using cast which requires a array
07:40:23PMunchI mean you can do this: https://play.nim-lang.org/#ix=2oeY
07:41:50PMunchNot quite sure how you're planning on using ReadBytes, but there might be other ways of doing it
07:43:24PMunchSomething like this for example might suit your needs: https://play.nim-lang.org/#ix=2oeZ
07:44:34*Vladar joined #nim
07:45:06FromDiscord<Shucks> that looks perfect. Gonna try it once i got the chance. Thanks you
07:47:40PMunchOh wait, you still need the address to read from :P
07:47:49PMunchBut you get the point
08:09:30*Trustable joined #nim
08:32:40PMunchfederico3, how simple do you think it would be to modify nimfmt to remove document comments?
08:33:23PMunchAnd related, how simple would it be to evaluate "when" statements and only include the ones that hold true?
08:33:38*Senketsu joined #nim
08:40:02FromDiscord<Shucks> Your function didn't returned the expected integers. ReadProcessMemory just returns 1/0 btw. it needs a pointer to save the read bytes. My current solution: https://play.nim-lang.org/#ix=2ofh
08:47:00PMunchOh, I didn't realise that ReadProcessMemory returned anything :P Just put a discard in front of it and it should work fine
08:47:20PMunchThat `result` variable is implicitly returned at the end of the procedure if nothing else is returned. But if ReadProcessMemory returns anything that will be returned instead
08:48:03PMunchTypically you'd have to explicitly `discard` any return value that you're not using, but I'm guessing that ReadProcessMemory is annotated with {.discardable.}
08:48:11PMunch@Shucks ^
08:53:01PMunchAnd I am supplying a pointer to `result`, which is the memory location of the implicit return variable. If I remember my C calling convention correctly this means that it will write it directly to the stack frame of the caller without any indirection.
08:54:17PMunchhttps://play.nim-lang.org/#ix=2ofo
08:54:43PMunchhttps://play.nim-lang.org/#ix=2ofq <- fixed example
08:55:39*Jjp137 quit (Ping timeout: 256 seconds)
09:05:47*NimBot joined #nim
09:09:09FromDiscord<Shucks> That seems to work
09:09:10FromDiscord<Shucks> awesome
09:09:35FromDiscord<Shucks> Sorry in brand new to nim btw
09:10:23*terps quit (Ping timeout: 252 seconds)
09:11:08PMunchNo worries, what you were doing wasn't really wrong (well apart possible from the &data[0] part which I'm still not quite sure what you expect to do)
09:11:53PMunchI just wanted to share a more "royale" snippet that leverages the type system and some other neat Nim features.
09:13:14*konvertex joined #nim
09:13:51FromDiscord<Shucks> To be honest I just tried to recode that golang snippet: https://play.golang.org/p/flWFK8lRVZA
09:14:10PMunchBy the way, the reason it doesn't work the same with sequences as it does with arrays is that arrays are essentially just a memory region big enough to hold your items a sequence is an object that consists of the size, the capacity, and a pointer to your data buffer. That's why cast[ptr int](data[0].addr)[] works, as the address of the first element in the buffer is the same as a pointer to the entire buffer.
09:15:28FromDiscord<Shucks> Oh
09:16:39FromDiscord<Shucks> So im trying to code something similar for WriteProcessMemory now 🙂
09:17:11PMunchDoing it the same way as in Go isn't really "wrong" in Nim, but by just sprinkling on a little type magic and Nim niceties it makes it a lot more ergonomic :)
09:18:12PMunchAnd with that read procedure you can of course do `let myArr = process.read(array[0..10, byte], addressToReadFrom)` if you want to read a specific amount of bytes.
09:19:06PMunchOnly thing you can't do is read a dynamic amount, because all this type stuff happens on compile-time. But you could easily have one that returns a sequence of bytes as well if you need that.
09:20:51FromDiscord<Shucks> > And with that read procedure you can of course do `let myArr = process.read(array[0..10, byte], addressToReadFrom)` if you want to read a specific amount of bytes.↵wow thats awesome
09:27:50federico3PMunch: why do you want to remove them?
09:28:40PMunchfederico3, I want to make a minimal stdlib for shipping with a program that integrates NimScript
09:29:46*Vladar quit (Quit: Leaving)
09:29:55PMunchI already have some code that you feed a script and it generates a stdlib based on which modules it needs. But I'd like to strip out any `when not defined(nimscript)` for example, and remove all the document comments.
09:29:58federico3it should be relatively simple, look at https://github.com/FedericoCeratto/nimfmt/blob/master/nimfmt.nim#L154
09:32:11PMunchYeah that's what I was looking at earlier
09:37:55*disruptek quit (Ping timeout: 265 seconds)
09:37:56*terps joined #nim
09:38:35*disbot quit (Ping timeout: 260 seconds)
09:41:17*disruptek joined #nim
09:41:44*disbot joined #nim
09:55:48*mal`` quit (Ping timeout: 265 seconds)
09:56:33*mal`` joined #nim
09:57:15*supakeen quit (Ping timeout: 265 seconds)
09:57:15*nisstyre quit (Ping timeout: 265 seconds)
09:58:58*nisstyre joined #nim
09:59:14*supakeen joined #nim
10:07:17*Senketsu quit (Ping timeout: 260 seconds)
10:14:02endragorDoes Nim's GC actually use acyclic pragma and try to determine whether types may produce ref cycle in general? I'd think it would iterate only through types whose children may produce cycles in mark and sweep phase, but it seems to iterate everything.
10:20:05endragorYeah I guess vanilla mark and sweep just requires to iterate through everything and there is no way around it
10:32:54*Senketsu joined #nim
10:34:42*terps quit (Ping timeout: 260 seconds)
10:35:11*terps joined #nim
10:40:16*krux02 joined #nim
10:57:40*Senketsu quit (Ping timeout: 265 seconds)
11:08:15*dadada quit (Ping timeout: 256 seconds)
11:09:10*dadada joined #nim
11:09:34*dadada is now known as Guest94642
11:14:35*sz0 joined #nim
11:14:59*krux02 quit (Remote host closed the connection)
11:21:18*haxscramper joined #nim
11:23:42*tane joined #nim
11:40:56*rockcavera joined #nim
11:43:32*terps quit (Ping timeout: 260 seconds)
11:44:17*terps joined #nim
11:53:15*dddddd joined #nim
11:53:53*zedeus quit (Ping timeout: 246 seconds)
11:59:37PMunchhttps://play.nim-lang.org/#ix=2ogb
11:59:53PMunchLittle command line parser I threw together ^
12:03:14alehander92col!
12:03:16alehander92cool*
12:04:44PMunchIt was inspired by exelotls post here: https://forum.nim-lang.org/t/6396
12:05:52*Vladar joined #nim
12:06:01*supakeen quit (Quit: WeeChat 2.8)
12:06:34*supakeen joined #nim
12:07:48alehander92i dont know man
12:07:59alehander92maybe: but if we look at programming languages as tools
12:08:11alehander92it sounds a bit to me like lets have just one database
12:08:16alehander92or just one other thing
12:08:35alehander92it seems normal to have many syntaxes/languages
12:11:33PMunchOh yeah, I wasn't really all that interested in the argument :P I just thought the idea behind the parser was cool, and writing a macro that parsed the string on compile-time was fairly trivial
12:18:53FromDiscord<Shucks> Any idea how WriteProcessMemory could be used? Currently it fails with error code 299. https://play.nim-lang.org/#ix=2ogj
12:21:57PMunchHmm, I think you'd need `cast[pointer](data.unsafeAddr)`
12:22:36PMunchIs that error code defined anywhere?
12:23:35alehander92wow
12:23:40alehander92i can't believe windows works like this
12:23:49alehander92https://superuser.com/questions/1522335/why-does-windows-allow-you-to-read-and-write-another-process-memory
12:24:08alehander92i mean, it makes sense, but maybe i didn't realize that
12:24:12FromDiscord<Shucks> sent a code paste, see http://ix.io/2ogo
12:25:35Zevvalehander92, how is that different from other OS's, like, you know, linux, for example?
12:25:59PMunchHmm, I'm guessing that the place you're writing to is too small. What type are you actually trying to write?
12:26:32alehander92zevv, well, can i just read/write from memory of other process-es on linux?
12:26:35Zevvsure
12:26:43Zevvhow do you think gdb works?
12:26:52alehander92by starting it
12:27:05FromDiscord<Shucks> At the moment just a float32 `p.write(glowIndexPointer + 4, 255.0.float32)`
12:27:20alehander92i probably assume if a process starts another process, it can have more rights for it
12:27:25PMunchAnd are you sure that SIZE_T is int32 on your system? If you're on a 64bit machine it should be int64
12:27:27alehander92not sure tho
12:27:40alehander92but yeah gdb can attach to an existing one
12:27:41PMunch@Shucks, what is that +4?
12:27:41Zevvno, you can attach: gdb -p <pid>
12:27:47Zevvit does a ptrace call
12:27:49alehander92using ptrace
12:27:55alehander92yeah strace can also attach
12:28:02Zevvstrace uses ptrace as well
12:28:05alehander92yeah
12:28:07Zevvit's the same mechanism
12:28:17alehander92so, all right
12:28:36FromDiscord<Shucks> Just a offset to get the right address. Size_t is int32 yea
12:29:02alehander92that puts "any random script might be a hack" in more real terms
12:29:20alehander92so why dont we all use sandbox-ed systems with different permission models
12:30:06alehander92one can block many of those syscalls on theory , right
12:31:53*tiorock joined #nim
12:31:53*tiorock quit (Changing host)
12:31:53*tiorock joined #nim
12:31:53*rockcavera quit (Killed (card.freenode.net (Nickname regained by services)))
12:31:53*tiorock is now known as rockcavera
12:31:56PMunch@Shucks, did you try the .unsafeAddr thing I suggested? You should also be able to use "csize_t" as the type by the way
12:32:14alehander92ok, so it seems that's what `firejail` does
12:32:23alehander92still a bit weird it's not more common place
12:32:29*lbart_ joined #nim
12:33:00alehander92i cant understand all that focus on https/etc when we just run all of your programs together without much protection
12:33:04*haxscram` joined #nim
12:33:24alehander92*alehander92 finds out how os-es work ep.7"
12:33:31*disruptek_ joined #nim
12:35:07*njoseph_ joined #nim
12:35:39*lbart quit (Disconnected by services)
12:36:07*lbart_ is now known as lbart
12:36:40*tribly quit (Ping timeout: 246 seconds)
12:36:40*njoseph quit (Ping timeout: 246 seconds)
12:36:40*dv^_^ quit (Ping timeout: 246 seconds)
12:36:40*Guest94642 quit (Ping timeout: 246 seconds)
12:36:40*FromDiscord quit (Ping timeout: 246 seconds)
12:36:41*Lord_Nightmare quit (Ping timeout: 246 seconds)
12:36:46*disruptek quit (Ping timeout: 264 seconds)
12:36:46*Zevv quit (Ping timeout: 264 seconds)
12:36:46*tane quit (Ping timeout: 264 seconds)
12:36:46*haxscramper quit (Ping timeout: 264 seconds)
12:36:46*Trustable quit (Ping timeout: 264 seconds)
12:36:47*so quit (Ping timeout: 264 seconds)
12:36:47*Amun_Ra quit (Ping timeout: 264 seconds)
12:36:47*Zevv joined #nim
12:36:47*dv^_^_ joined #nim
12:36:53*dadada joined #nim
12:36:54*Zevv quit (Changing host)
12:36:54*Zevv joined #nim
12:37:06*FromDiscord joined #nim
12:37:07alehander92ok so /proc/sys/kernel/yama/ptrace_scope
12:37:10alehander92is what i want
12:37:11*Trustable joined #nim
12:37:21*tribly joined #nim
12:37:21*so joined #nim
12:37:29*tane joined #nim
12:37:31*Lord_Nightmare joined #nim
12:37:32*dadada is now known as Guest42240
12:37:38*zedeus joined #nim
12:38:23*Amun_Ra joined #nim
12:38:45Zevvyou use yama?
12:38:46*PMunch quit (Ping timeout: 256 seconds)
12:39:20alehander92no idea?
12:39:31alehander92i just copy pasted it and it seems to exist on my system
12:45:04*dcmertens joined #nim
12:45:15dcmertensI have a question that arose using c2nim
12:45:15*kungtotte quit (Read error: Connection reset by peer)
12:45:38dcmertensIt creates new type definitions for me, which is great
12:45:58dcmertensProblem is, the C code defines structs, but refers to the structs by pointers always
12:46:14*kungtotte joined #nim
12:46:19dcmertensso I feel as though my Nim types should be ref types
12:46:37dcmertensInstead I get value types, with the {.bycopy.} pragma
12:46:50dcmertensmy question is: what do I do with these types?
12:46:57*neceve_ joined #nim
12:47:02dcmertensis there a good tutorial for using the output of c2nim?
12:47:21dcmertensAnother question: how do I create Nim typedefs for function pointers?
12:47:44dcmertensscratch that last question
12:48:17dcmertensI'll come back to that later
12:50:05*filcuc joined #nim
12:50:10*neceve joined #nim
12:52:20*Vladar quit (Quit: Leaving)
12:52:39*PMunch joined #nim
12:52:40dcmertensHaving found and read the manual's discussion of bycopy and byref pragmas, I think I need to see these in action
12:53:50dcmertensIs there any way to search the Nim playground for code examples?
12:57:57dcmertensOK, the SDL2 wrapper gives me something to work with: https://github.com/nim-lang/sdl2/blob/master/src/sdl2.nim#L66
12:59:50dcmertensand here is the corresponding C header: https://github.com/emscripten-ports/SDL2/blob/master/include/SDL_events.h#L509
12:59:51FromGitter<kaushalmodi> dcmertens: ⏎ ⏎ > Is there any way to search the Nim playground for code examples? ⏎ ⏎ Playground runs and renders snippets from ix.io links. So I doubt that those are searchable [https://gitter.im/nim-lang/Nim?at=5ed8f047a3a1b13679c85dff]
12:59:57FromGitter<kaushalmodi> But you can always search GitHub
13:00:10*filcuc quit (Quit: Konversation terminated!)
13:00:53dcmertenskaushalmodi, thanks. I am trying to figure out what is (at least somewhat) idiomatic, and my findings above for SDL2 show that neither the byvalue or byref pragmas are really needed
13:01:21*dcmertens wonders if any of this kind of thing is in the c2nim docs
13:01:57dcmertensaha, c2nim doesn't have a man page
13:02:02dcmertenswhat is nim's equivalent of perldoc?
13:02:05*naught-fowl joined #nim
13:02:36FromGitter<kaushalmodi> https://nim-lang.github.io/Nim/theindex.html ?
13:02:51FromGitter<kaushalmodi> It's helpful to bookmark that and just Ctrl+F in there
13:03:09FromGitter<kaushalmodi> or use the Search from any of the manual/stdlib pages
13:06:04*zacharycarter joined #nim
13:06:44*dcmertens checks it out
13:06:58dcmertensoh my
13:10:36FromGitter<sheerluck> This is why Araq uses Windows 10 -- https://www.youtube.com/watch?v=cZN5n6C9gM4
13:15:39Zevvdo you have a summary that does not cost me 1:13:06 of my life?
13:15:59FromGitter<kaushalmodi> dcmertens: That theindex.html is mentioned as Searchable Index on https://nim-lang.org/documentation.html
13:16:14dcmertensZevv++
13:16:22FromDiscord<Shucks> > Hmm, I think you'd need `cast[pointer](data.unsafeAddr)`↵@PMunch[IRC]#0000 fixed it btw.
13:16:22FromGitter<sheerluck> Zevv I still only 49 min in :(
13:16:45PMunchZevv, haven't you seen any of Bryans earlier talks?
13:17:12*couven92 joined #nim
13:18:39ZevvI don't know the guy, but I can see where he's going :)
13:18:50*couven92 is now known as fredrikhr
13:19:51*naught-fowl quit (Remote host closed the connection)
13:20:22PMunchHe has videos back to like 2013 about this. Basically listing reasons that Linux sucks, and then ending by explaining why it is actually awesome
13:21:19dcmertensI moused through the video and read the slides. It feels a lot more like a subversive call to action. I like it. :-)
13:21:51FromDiscord<Rika> how do i return an async function early?
13:21:59FromDiscord<Rika> im not sure what im doing lmao
13:23:21PMunch@Rika, what do you mean?
13:23:40alehander92it should just work
13:23:47FromDiscord<Rika> a bare return?
13:24:07alehander92iirc yes
13:24:07FromDiscord<Rika> its giving me that it yielded nil
13:24:17alehander92ok are you using a template!
13:24:26FromDiscord<Rika> is it not possible with a template?
13:24:49alehander92its .. complicated
13:24:55PMunchNope.. The current implementation looks through the AST and replaces "return" with whatever it needs to return
13:25:01alehander92try `return result`
13:25:06alehander92yeah i am not sure how to fix
13:25:20alehander92i think i added `earlyReturn` in my own patch
13:26:05PMunchhttps://github.com/nim-lang/Nim/blob/version-1-2/lib/pure/asyncmacro.nim#L110
13:26:21PMunchThis is basically what it does, replace "return" with some stuff
13:26:28alehander92maybe some kind for `for ` with break works?
13:26:44PMunchWhat you can do is wrap your body in a block and then break that block from within the template, that should work.
13:26:47alehander92but yeah hard to do from another template
13:27:56FromDiscord<Rika> pain.
13:28:23alehander92it's annoying, sorry
13:29:09PMunchhttps://play.nim-lang.org/#ix=2ogK
13:29:15PMunchSomething like that ^
13:31:06alehander92thats smart
13:31:15alehander92maybe async should generate a block
13:31:17alehander92always
13:31:23alehander92and name it with some kind of reserved name
13:31:33alehander92like nimAsyncBlock
13:31:42PMunchI think I added something like that to Jester
13:31:45PMunchIt had the same issue
13:32:00alehander92so one can write a template which directly does it .. but a template cant return just `break stuff`
13:32:09alehander92which is strange
13:32:15alehander92maybe a macro can
13:32:43PMunchSomething like this works: https://play.nim-lang.org/#ix=2ogN
13:32:47alehander92we should RFC this somewhere
13:33:08PMunchWhat do you mean it can't just return that? It works jut fine..
13:33:30alehander92ah ok
13:33:32alehander92i thought it cant
13:38:01FromDiscord<Shucks> Me again. What do I have to do if I want to make the data param flexible to accept arrays and single data types aswell? https://play.nim-lang.org/#ix=2ogP
13:39:44PMunchUhm, that doesn't look right..
13:39:49PMunchThe array part in particular
13:39:57PMunchIt shouldn't even need special handling..
13:41:51FromDiscord<Shucks> ugh yea.
13:42:03FromDiscord<Shucks> p.write(glowIndexPointer + 4, [255.0.float32, 0.0, 0.0, 1.3])
13:42:07FromDiscord<Shucks> that works already. Thanks lol
14:01:03*rockcavera quit (Remote host closed the connection)
14:12:25*waleee-cl joined #nim
14:42:35*terps quit (Ping timeout: 246 seconds)
14:45:39*theelous3 joined #nim
14:46:33*dcmertens quit (Remote host closed the connection)
14:48:55*brainproxy quit (Quit: WeeChat 2.8)
14:59:39*bung quit (Ping timeout: 260 seconds)
15:10:08*Vladar joined #nim
15:18:10*aeverr quit (Quit: Konversation terminated!)
15:25:25*endragor quit (Remote host closed the connection)
15:25:53*endragor joined #nim
15:30:18*PMunch quit (Quit: leaving)
15:36:11*dcmertens joined #nim
15:36:30*endragor quit (Ping timeout: 244 seconds)
15:36:50dcmertenswhen declaring an object type layout, can I specify two elements on the same line
15:37:05dcmertensfor example, if X and Y are coordinates, both of type double
15:37:41dcmertenser, sorry, both of type float
15:41:48*kenran quit (Ping timeout: 256 seconds)
15:46:53*bung joined #nim
15:50:19*terps joined #nim
15:57:17*terps quit (Quit: WeeChat 2.8)
16:00:44FromDiscord<Recruit_main707> can you wrap a cpp class in nim?
16:00:59FromDiscord<Recruit_main707> and if thats a yes, can you use it in the c backend?
16:07:58*bung quit (Ping timeout: 265 seconds)
16:08:10FromDiscord<Rika> dcmertens: uh, what?
16:08:36FromDiscord<Rika> so like `type X = object\n x, y: float`?
16:08:36FromDiscord<Rika> yes
16:11:20dcmertensRika, yes, and thank you!
16:11:40dcmertensI apologize for being lazy and not just trying it. :-/
16:12:01FromDiscord<Rika> lol i mean thats fine
16:25:37*endragor joined #nim
16:34:12*endragor quit (Ping timeout: 256 seconds)
16:50:55*endragor joined #nim
16:55:28*endragor quit (Ping timeout: 256 seconds)
16:58:57*Jjp137 joined #nim
17:01:53*endragor joined #nim
17:01:57*bung joined #nim
17:03:17arecaceaewhat's best again to allocate a bytebuffer of dynamical size for use with io.readBuffer ?
17:06:03FromDiscord<zetashift> If I have a `Character` which has, for example, 2 states defined as an Enum, and a `Player` type which inherits from `Character` but needs to have 4 states, am I better off maybe moving possible `State`s in a seperate file and then building a `Player` from a a few of those `State`s?
17:06:51FromDiscord<zetashift> Basically what would be the Nim way to model the Character and Player that inherits states from it, I'm using Godot so I'm kind of forced to use single inheritance
17:07:11*silvernode joined #nim
17:07:17*endragor quit (Ping timeout: 260 seconds)
17:09:35*endragor joined #nim
17:14:38*Jjp137 quit (Read error: Connection reset by peer)
17:16:23*endragor quit (Ping timeout: 260 seconds)
17:17:01disruptek_~experimental is Features of Nim that are to be considered experimental are documented at https://nim-lang.org/docs/manual_experimental.html
17:17:02disbotexperimental: 11Features of Nim that are to be considered experimental are documented at https://nim-lang.org/docs/manual_experimental.html
17:19:28*Jjp137 joined #nim
17:21:43*waleee-cl quit (Quit: Connection closed for inactivity)
17:21:45*endragor joined #nim
17:28:37*endragor quit (Ping timeout: 258 seconds)
17:31:40*bung quit (Ping timeout: 256 seconds)
17:32:15*endragor joined #nim
17:32:27*rockcavera joined #nim
17:42:30*endragor quit (Ping timeout: 256 seconds)
17:51:19*letto quit (Quit: Konversation terminated!)
17:51:54*Trustable quit (Remote host closed the connection)
17:53:09*lritter quit (Ping timeout: 258 seconds)
17:54:16*Zevv quit (Quit: leaving)
17:54:26*Zevv joined #nim
17:54:26*Zevv quit (Changing host)
17:54:26*Zevv joined #nim
17:56:43*Jesin quit (Quit: Leaving)
17:58:17*Jesin joined #nim
18:01:54FromDiscord<Shucks> Are there some real nim ide's yet? vsc feels laggy and weird tbh
18:03:13FromDiscord<Recruit_main707> visual studio support could be easily updated to work with latest version i think, and intellij has lsp support so *theorically* (because i havent been able to do it) it could also work
18:03:36FromDiscord<Recruit_main707> but currently working, vscode is the best
18:04:16FromDiscord<Shucks> Alright
18:04:48*PMunch joined #nim
18:06:43FromDiscord<Recruit_main707> can i easily change the types of a function from inside a macro so that it converts them into their compatible representation (if existent)?↵So that for example: `proc function(a: int): string`↵is converted to `proc function(a: cint): cstring`
18:07:24FromDiscord<Recruit_main707> by easily i mean substituting them in the proc's ast directly
18:07:35disruptek_of course.
18:07:37disruptek_but why?
18:08:19FromDiscord<Recruit_main707> my lazyness has no limit
18:08:49FromDiscord<Recruit_main707> (and i want to gain some experience with macros)
18:10:27*Jjp137 quit (Read error: Connection reset by peer)
18:13:03*Jjp137 joined #nim
18:17:39FromDiscord<zetashift> Vim with leorize's nvim plugin also works excellent, couldn't get it to work on Windows tho
18:17:49FromDiscord<Rika> i dont think you even need to do that recruit
18:18:51*endragor joined #nim
18:24:09*letto joined #nim
18:29:10FromDiscord<waghanza> hi,↵could someone help me on https://github.com/the-benchmarker/web-frameworks/pull/2857#issuecomment-639022118↵I can compile, but I have `could not load: libpcre.so(.3|.1|)` on **alpine**
18:29:10disbot[Nim] Add akane
18:32:14*endragor quit (Ping timeout: 240 seconds)
18:33:00FromDiscord<Rika> do you have pcre installed
18:34:07*D_ quit (Ping timeout: 240 seconds)
18:36:55*disruptek_ is now known as disruptek
18:37:42FromDiscord<KrispPurg> sent a code paste, see http://ix.io/2oi8
18:38:00*D_ joined #nim
18:40:47*tiorock joined #nim
18:40:47*rockcavera quit (Killed (hitchcock.freenode.net (Nickname regained by services)))
18:40:47*tiorock is now known as rockcavera
18:41:01FromDiscord<waghanza> @Rika yes↵@KrispPurg I have the same thing
18:41:11FromDiscord<waghanza> I'm trying to test https://github.com/Ethosa/akane
18:42:07*kenran joined #nim
18:42:50*D_ quit (Ping timeout: 256 seconds)
18:44:26*fredrikhr quit (Ping timeout: 246 seconds)
18:44:39FromDiscord<Rika> @KrispPurg ive observed that to only happen on windows
18:45:25FromDiscord<KrispPurg> huh.
18:46:05*D_ joined #nim
18:47:45*silvernode quit (Quit: Leaving)
18:47:52FromDiscord<Kiloneie> Has noone noticed how badly this search looks on dark mode ? https://media.discordapp.net/attachments/371759389889003532/718174195397427331/unknown.png
18:49:08PMunchOuch..
18:49:51FromDiscord<Rika> i have
18:49:57FromDiscord<Rika> but i dont use search that often anymore
18:49:59FromDiscord<Rika> so yeah
18:50:39FromDiscord<willyboar> @waghanza this example don't work neither on mac
18:52:07FromDiscord<willyboar> @Kiloneie looks awful
18:54:06FromDiscord<waghanza> I've tested on `linux` and `osx`
18:54:33FromDiscord<KrispPurg> you still got the same error from linux and osx?
18:54:49FromDiscord<KrispPurg> @waghanza
18:55:09FromDiscord<Kiloneie> this will burn people's eyes on my next video... oh well
18:55:19FromDiscord<waghanza> the `SIGSEGV: Illegal storage access.` yes
18:55:26FromDiscord<KrispPurg> I use ctrl+f anyways
18:55:35FromDiscord<KrispPurg> I see.
18:56:21FromDiscord<Kiloneie> il show both, go away from search box quickly
18:56:48FromDiscord<Kiloneie> how does it look on other oses ?
18:57:33FromDiscord<willyboar> I remember.... probably is the asynchttpserver bug
18:57:58FromDiscord<KrispPurg> I wonder if anyone has made an issue about this in the Nim github.
18:58:15FromDiscord<willyboar> it is fixed already in the devel
18:58:36FromDiscord<willyboar> it is included in the 1.2.2
18:58:50FromDiscord<willyboar> let me try with 1.0.4 to be sure
18:59:51FromDiscord<KrispPurg> I hope it's either fixed in all OSs.
19:00:41*neceve_ quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
19:01:15*neceve_ joined #nim
19:03:04FromDiscord<willyboar> yeap it works on 1.0.4 except of the post i think
19:04:14FromDiscord<KrispPurg> wdym by post?
19:06:03FromDiscord<willyboar> I am talking for the akane example @waghanza posts. Ethosa's example with sendPlaintext don't work at all
19:06:09FromDiscord<Kiloneie> I have a question, would it be okay to use my current thumbnail i use for my nim video series, change the name and change the birghtness or color slightly for another series for nim ? I didn't make my thumbnail, can't make another one of a whip D:...
19:06:16FromDiscord<KrispPurg> ah.
19:07:13*waleee-cl joined #nim
19:15:11*kenran quit (Ping timeout: 258 seconds)
19:15:49FromDiscord<Yardanico> @Kiloneie search is fixed in devel
19:16:52FromDiscord<Yardanico> https://github.com/nim-lang/Nim/issues/13972
19:16:53disbotDocs Search `Results` box styling is not Dark Mode Friendly
19:17:35FromDiscord<Yardanico> And will be fixed in 1.2.2
19:18:18PMunch@Yardanico, did you see that I found a bug in the edit thing in the bot earlier?
19:19:36FromDiscord<Yardanico> Sorry, missed it. You mean with context? I know the edit diffing is broken when you insert in the middle or something like that
19:19:39FromDiscord<Yardanico> Like this
19:19:45FromDiscord<Yardanico> (edit) 'Like ... this' => 'Likeedit'
19:20:44FromDiscord<KrispPurg> Is it a bug in the module?
19:20:53FromDiscord<KrispPurg> (edit) 'module?' => 'module you are using?'
19:20:55FromDiscord<Yardanico> ?
19:20:56FromDiscord<Yardanico> No
19:21:07FromDiscord<Yardanico> It's a bug in my edit diffing
19:21:29FromDiscord<Yardanico> Because it's not an obvious thing to do, there are different slices and stuff
19:21:36FromDiscord<willyboar> @KrispPurg the bug with asynchttpserver i think is backported
19:22:02FromDiscord<KrispPurg> I see.
19:24:19FromDiscord<Yardanico> Yes it is
19:25:19FromDiscord<waghanza> > I am talking for the akane example @waghanza posts. Ethosa's example with sendPlaintext don't work at all↵@willyboar yes, I've seen that, so I use `post`
19:25:31FromDiscord<waghanza> (edit) '`post`' => '`send` macro'
19:30:15FromDiscord<willyboar> @waghanza you must edit the yaml file. 😛
19:31:18FromDiscord<waghanza> ?
19:31:38FromDiscord<willyboar> you are still have jester in the yaml file
19:31:50*Vladar quit (Quit: Leaving)
19:31:52FromDiscord<waghanza> ah, thx good catch 🎉
19:42:41*Jesin quit (Quit: Leaving)
19:47:44PMunchIs there a way to nest iterators and yield the outer one from the inner one?
19:47:49*Jesin joined #nim
19:52:54*dcmertens quit (Ping timeout: 240 seconds)
19:52:57Zevvyou keep trying, eh
19:53:08PMunchYou know it
19:53:15ZevvI've been there, but I gave up
19:53:21PMunchI realised that this Fiber idea is actually pretty neat
19:53:31Zevvdump my your url again
19:53:55PMunchhttp://ix.io/2oby
19:53:59ZevvI might follow up on this because I'm on a motivation rollercoaster with this CPS stuff
19:54:53PMunchI realised that you can implement producer/consumer patterns with it as well
20:06:54ZevvI think the 'pool of parallel things' is not the use case that people are looking for, other patterns make more sense indeed
20:07:03Zevvproduced/consumer, async IO
20:08:23PMunchThat's the nice thing with Fibers, since you have more control over the flow you can do different things with them
20:08:31Zevvright
20:08:42PMunchStill not 100% sure how I'd do async IO though
20:09:51Zevvstart with that :)
20:10:44Zevvyou can borrow my tiny event loop: https://github.com/zevv/nimcoro/blob/master/eventqueue.nim :)
20:13:12PMunchI've already looked at that :)
20:13:31PMunchBasically it would be up to the event loop to support it
20:13:37PMunchIt wouldn't be a feature of Fibers itself
20:13:44Zevvsurely not
20:13:45PMunchitself/themselves
20:13:49Prestigeo/
20:14:37Zevvyou don't want anything entwined with anything pumping your fibers
20:14:42Zevvjust the building blocks
20:14:43AraqZevv, do you need assistance for CPS?
20:15:12ZevvAraq: I'm not sure, but I'm not making large steps
20:15:16PMunchI mean you could always register a Fiber that did a poll to see if it was done and yielded otherwise.
20:15:39Araqtried .partial objects and .liftlocals?
20:15:58ZevvMy plan was to make a proof of concept in macros, just for the sake of easier development then going into the compiler straight away. Can only transform a subset of nim from there, but should be good enough to get the hang of it.
20:16:29Araqcompiler exposes some support via the undocumented pragmas that I mentioned
20:16:37Zevvyeah, but that's not for use in macros, right
20:16:54Araqthe macro can emit the annotations
20:17:32Zevvok, I will have to look into taht - but I didn't properly get into the lifting yet, my problem is in the splitting part still
20:17:48Zevvit's not really trivial, there's a lot of corner cases which are not explicit in the papers
20:18:11Zevvhonestly, I'm not sure if I'll get there in the end
20:18:35Zevvand my motivation goes up and down three times a day, also due to other reasons in life
20:19:38PMunchOh well, I'm off to bed
20:19:44FromDiscord<Kiloneie> sent a long message, see http://ix.io/2oiZ
20:19:44Zevvslep tight
20:21:03Araqand the splitting yeah.
20:21:20AraqI can imagine it's harder than it looks :-)
20:21:45Araqthe paper mentions you have to make the gotos explicit, even the "fall through" gotos
20:22:43Zevvyeah, but I'm still not sure if it can be done without this step
20:22:59Zevvso my plan was to make a collection of basic patterns and their transformations
20:23:08Araqwhy try without this step?
20:23:37Zevvit feels very awkward somehow - I have the nagging feeling that it can be done depth first recursive as well
20:23:54*narimiran quit (Ping timeout: 240 seconds)
20:23:58Zevvbut then again - if that was the case, why did the author not do it like that
20:24:11ZevvI'd like to have a good talk with the guy and ask him some questions I guess
20:24:39Araqusually 'break' and 'return' cause troubles for simple recursive traversals
20:25:16Zevvfair enough - probably one of the reasons 'break' is bothering me as well
20:26:06AraqI don't complain all day long about "unstructured control flow" because I'm a zealot
20:26:24AraqI complain because it makes everything harder
20:26:40*Zevv quit (Quit: Lost terminal)
20:26:55*Zevv joined #nim
20:27:00Zevvoops sorry dropped out
20:27:40ZevvI'm also not sure yet if implicit control flow like 'and' expressions need work. `if a() and b():` - don't run b() if a() is false, so does that need rewriting and gotos?
20:28:18ZevvI've tried to look into the cpc implementation, but it's not exactly trivial
20:29:32Araq'and' is simple, don't allow yield points between the expressions
20:29:58Zevvhmm ok
20:30:51PrestigeAnyone know why the X11 wrappers have a `T` prefix for types? Seems odd
20:31:03PrestigeAsking because I'm writing a wrapper for Xft but haven't been including that prefix
20:31:26Zevvanyway, I think I do have a proper grasp of CPS itself and do see what it could bring, but the actual work to get there is harder then I thought it would be. I figured that the manual translations still had a lot of "intutiton" going on :)
20:31:43*PMunch quit (Quit: leaving)
20:33:36AraqPrestige, legacy from the days we had a T type prefix
20:34:27PrestigeWould it be a breaking change to remove them or should I include them for xft?
20:34:31AraqZevv, maybe it helps if the first version only supports a subset and produces a reasonable error for too complex stuff
20:35:00AraqPrestige, yeah but it's fine, we can release a version 2.0, semver ftw
20:35:14Prestigesweet
20:35:50FromDiscord<Rika> i dont know if ara q is sarcastic about the ftw but i kinda feel it
20:36:24ZevvAraq: that is what I'm aiming at. So no for loops, just basic while/if control flow
20:37:01Zevvjust saying: if you want this to go fast, you might not want to wait for me :)
20:39:51FromDiscord<Technisha Circuit> How would i get the name of a proc as a string? In Python you do `function.__name__|
20:39:56FromDiscord<Technisha Circuit> (edit) '`function.__name__|' => '`function.__name__`'
20:40:52FromDiscord<Rika> you can only get it on compile time
20:41:27FromDiscord<Rika> actually, what's the point?
20:41:57Zevvhandy for logging
20:42:32ZevvI'd love __FILE__ __FUNCTION__ __LINE__ equivalents in Nim
20:44:40FromDiscord<Rika> hmm makes sense
20:51:57AraqZevv, there are ways to get them but only Timothee knows how to
20:52:03FromDiscord<Recruit_main707> are there any `memfiles` examples?
20:53:09Yardanico@Technisha https://github.com/nim-lang/Nim/issues/8212
20:53:11disbotwe need a standard way to get name of procedure ; snippet at 12https://play.nim-lang.org/#ix=25Yt
20:53:22Yardanicohttps://stackoverflow.com/a/51198228 this one is C(C++/ObjC)-backend specific
20:53:26Araq"blah, wah C++ templates are Turing complete", oops, https://releases.llvm.org/8.0.0/tools/clang/docs/UsersManual.html#cmdoption-ftemplate-depth
20:53:29Yardanicoanswer by timo :P
21:20:58FromDiscord<Technisha Circuit> Thanks Yardanico!
21:23:35*neceve_ quit (Ping timeout: 265 seconds)
21:32:29*haxscram` quit (Remote host closed the connection)
21:47:07*NimBot joined #nim
21:47:08*inv2004 joined #nim
21:54:03stefantalpalaruWhat's that define for getting verbose output from dlopen()?
21:56:20inv2004Hello, how can I get type from NimNode in macro? https://play.nim-lang.org/#ix=2ojs
21:56:37Yardanicostefantalpalaru: -d:nimDebugDlOpen iirc
21:56:50Yardanicoinv2004: NimNodes don't have a type
21:56:55Yardanicosymbols have a type
21:57:01Yardanicowell if NimNode is a symbol it has a type
21:57:26stefantalpalaruThanks, Yardanico.
21:57:40inv2004I am confused, can I have typedesc == string from SVal "string" ?
21:58:40inv2004s/SVal/StrLit/
21:59:29arecaceaewhat's best again to allocate a bytebuffer of dynamical size for use with io.readBuffer ?
21:59:57arecaceaeI guess I used to do a newSeq and pass the addr of the first element ?
22:00:29FromDiscord<Recruit_main707> inv2004: is this what you want?↵https://play.nim-lang.org/#ix=2kZd
22:02:27inv2004Recruit_main707, no, because I have proc which do typedesc => Kind conversion. You do string => Kind, I can also do it, but want to reuse proc with typedesc mapping
22:16:15inv2004Are there any diff if I use proc f[T]() with when T is ... and proc f(T: typedesc) ?
22:17:43*tane quit (Quit: Leaving)
22:26:41disruptekballs.
22:35:27*noonien quit (Ping timeout: 240 seconds)
22:35:43*msmorgan quit (Ping timeout: 260 seconds)
22:35:48*waleee-cl quit (Ping timeout: 246 seconds)
22:35:51*sirn quit (Ping timeout: 272 seconds)
22:36:18*surma quit (Ping timeout: 256 seconds)
22:36:30*Hotbees quit (Ping timeout: 272 seconds)
22:37:04*matti quit (Ping timeout: 244 seconds)
22:37:07*alehander92 quit (Ping timeout: 272 seconds)
22:37:08*zielmicha__ quit (Ping timeout: 272 seconds)
22:37:08*jholland__ quit (Ping timeout: 272 seconds)
22:37:12*LyndsySimon quit (Ping timeout: 260 seconds)
22:37:25*r4vi_ joined #nim
22:37:26*sz0 quit (Ping timeout: 256 seconds)
22:37:27*ormiret quit (Ping timeout: 240 seconds)
22:37:28*r4vi quit (Ping timeout: 260 seconds)
22:37:28*r4vi_ is now known as r4vi
22:37:45*nikita` quit (Ping timeout: 272 seconds)
22:37:46*euantor quit (Ping timeout: 272 seconds)
22:37:46*d10n-work quit (Ping timeout: 272 seconds)
22:37:46*npgm quit (Ping timeout: 272 seconds)
22:37:46*waleee-cl joined #nim
22:37:47*l1x quit (Ping timeout: 260 seconds)
22:37:47*matlock quit (Ping timeout: 260 seconds)
22:37:47*rayman22201 quit (Ping timeout: 260 seconds)
22:37:50*LyndsySimon joined #nim
22:38:09*jholland__ joined #nim
22:38:18*bung joined #nim
22:39:02*l1x joined #nim
22:39:04*msmorgan joined #nim
22:39:17*d10n-work joined #nim
22:40:15*rayman22201 joined #nim
22:40:22*alehander92 joined #nim
22:40:23*surma joined #nim
22:40:42*npgm joined #nim
22:40:46*euantor joined #nim
22:40:55*inv2004 quit (Ping timeout: 265 seconds)
22:41:11*matlock joined #nim
22:42:23*Hotbees joined #nim
22:42:35*nikita` joined #nim
22:42:41*noonien joined #nim
22:42:47*sz0 joined #nim
22:49:02*inv2004 joined #nim
22:51:10FromGitter<codenoid> hi nim folks
22:51:18FromGitter<codenoid> how you doin
22:51:57*ormiret joined #nim
22:51:58inv2004codenoid, even better than JavaScript!
22:52:48*matti joined #nim
22:52:58*bung quit (Ping timeout: 256 seconds)
22:53:57*zielmicha__ joined #nim
22:55:57FromGitter<codenoid> 😄
22:57:29FromDiscord<willyboar> disruptek: everything ok?
22:58:00stefantalpalaruDoes anyone remember why tlsEmulation is enabled by default on macOS? https://github.com/nim-lang/Nim/blob/c1ca06b4525b12022a5f8368582549e5bb01a438/config/nim.cfg#L172
23:03:26stefantalpalaruIt was a drive-by change in this unrelated commit: https://github.com/nim-lang/Nim/commit/78f4aacde9e79e9a13b17dc2a3709d5f09a0ae0b
23:03:55*sirn joined #nim
23:04:08*inv2004 quit (Quit: Leaving)
23:15:24stefantalpalaruMaybe an artefact from a time when Apple's Clang didn't support TLS properly?
23:20:28stefantalpalaruXcode 8 and later should be fine with a real thread-local storage: https://stackoverflow.com/questions/28094794/why-does-apple-clang-disallow-c11-thread-local-when-official-clang-supports/29929949#29929949
23:25:19*FromDiscord quit (Remote host closed the connection)
23:25:19*FromDiscord joined #nim
23:27:07FromDiscord<Zachary Carter> I see `os` has `unixToNativePath` but is there anything that converts a non-unix path to a unix path?
23:33:38FromDiscord<Zachary Carter> it's easy enough to do - like mostly just need to replace `\\` with `/` - but I'm just curious if something already exists...
23:51:02*Jesin quit (Ping timeout: 260 seconds)
23:57:15*bung joined #nim
23:58:36*endragor joined #nim