<< 25-06-2016 >>

00:00:30*J3RN joined #nim
00:12:14AraqDemos: it's only allowed in 'push'
00:12:19Araqfor some reason.
00:31:08*bacterius joined #nim
00:37:23PMunchHmm, somethings not right
00:38:20PMunchI call on XQueryTree and get back a list of pointers and a length. But putting it in a loop and printing out the pointers yields one valid pointer, one invalid one, and the rest are just 0..
00:45:11AraqPMunch: considered using Wayland instead?
00:45:21Araqisn't that the future anyway?
00:45:34PMunchNot really, as I don't use Wayland it would be a bit pointless for me
00:45:47PMunchWell, some believe it is, some don't
00:46:06PMunchBut I'm not switching over until things work at least as good in wayland as they do in X
00:55:07*ics quit (Quit: Connection closed for inactivity)
00:56:27*PMunch quit (Quit: leaving)
01:15:09*heretobang joined #nim
01:16:10*fredrik92 quit (Quit: Shutting down...)
01:20:15fvsI can get env vars using getEnv - but howto get shell vars like LINES, COLUMNS ?
01:21:12*brson quit (Read error: Connection reset by peer)
01:22:12fvshmm, tput
01:24:55*brson joined #nim
01:33:33*zds joined #nim
01:41:29*chemist69_ joined #nim
01:42:17*yglukhov quit (Remote host closed the connection)
01:44:40*chemist69 quit (Ping timeout: 258 seconds)
01:45:41*brson quit (Read error: Connection reset by peer)
01:50:02*fvs quit (Ping timeout: 250 seconds)
01:50:11*brson joined #nim
01:50:21*yglukhov joined #nim
01:55:01*yglukhov quit (Ping timeout: 258 seconds)
01:56:36*fvs joined #nim
02:03:14*chrisheller quit (Remote host closed the connection)
02:08:58*chrisheller joined #nim
02:10:16*fvs quit (Quit: Leaving)
02:19:19*bacterius quit (Quit: Page closed)
02:19:38*bacterius joined #nim
02:20:54*bacterius quit (Client Quit)
02:29:18*brson quit (Read error: Connection reset by peer)
02:29:26*bacterius joined #nim
02:35:07*brson joined #nim
02:42:28*samdoran joined #nim
02:43:31*bacterius quit ()
02:44:00*saml_ joined #nim
02:44:23*bacterius joined #nim
02:46:13bacteriushi all, what do I need to do to make --os:standalone and --gc:none work together? I seem to be getting a weird error when importing strutils with those settings: lib/pure/strutils.nim(1008, 14) Error: could not resolve: line[j .. j + < len(padding)]
02:49:41def-bacterius: hi. I believe you will have trouble using strings in general with no os to allocate heap memory from and no gc to collect that memory
02:50:43*samdoran quit (Quit: Page closed)
03:04:44zdsi was thinking it would be interesting to implement a shell in Nim
03:07:49*jlp765 joined #nim
03:08:16bacteriusdef- I see; it looks like all of the other GC implementations use too much .bss so I guess I will have to implement my own tiny GC...
03:08:57*brson quit (Quit: leaving)
03:13:56*jlp765 left #nim (#nim)
03:22:16*chrisheller quit (Ping timeout: 252 seconds)
03:26:46*akaisora quit (Remote host closed the connection)
03:33:45*chrisheller joined #nim
03:52:15*yglukhov joined #nim
03:54:59*GangstaCat quit (Quit: Leaving)
03:56:55*yglukhov quit (Ping timeout: 252 seconds)
04:00:42*trusion quit (Ping timeout: 244 seconds)
04:01:12*trusion joined #nim
04:06:24*codye quit (Quit: Page closed)
04:20:25*cheatfate_ joined #nim
04:20:39*desophos joined #nim
04:21:25*saml_ quit (Quit: Leaving)
04:23:19*chrisheller quit (Ping timeout: 252 seconds)
04:23:48*cheatfate quit (Ping timeout: 244 seconds)
04:34:38*chrisheller joined #nim
04:50:40*Demos quit (Ping timeout: 244 seconds)
05:00:48bacteriusyeah it seems --gc:none just pretty much disables anything related to NimString... I think I need to figure out exactly what the --gc flag does to the compiler
05:04:13*edub4rt quit (Remote host closed the connection)
05:37:18bacteriusyeah I see it now, hasAlloc goes false and so mmdisp and sysstr don't get included. :(
05:54:14*yglukhov joined #nim
05:59:56*yglukhov quit (Ping timeout: 272 seconds)
06:02:04*Demon_Fox quit (Quit: Leaving)
06:15:07bacteriusoh wow, I found the problem, it was coming from the "echo("out of memory")", "quit(1)" in the raiseOutOfMem() in mmdisp.nim, these totally won't link when there's no OS
07:01:45*nsf quit (Quit: WeeChat 1.5)
07:01:57*bacterius quit (Ping timeout: 260 seconds)
07:02:43*bacterius joined #nim
07:16:38*flyx quit (Ping timeout: 258 seconds)
07:17:18*flyx joined #nim
07:23:21*Trustable joined #nim
07:32:24*flyx quit (Ping timeout: 272 seconds)
07:33:16*flyx joined #nim
07:56:56*yglukhov joined #nim
08:01:33*yglukhov quit (Ping timeout: 276 seconds)
08:18:38*flyx quit (Ping timeout: 272 seconds)
08:19:19*flyx joined #nim
08:20:08*Trustable quit (Remote host closed the connection)
08:39:26*flyx quit (Ping timeout: 258 seconds)
08:40:21*flyx joined #nim
08:44:11*arnetheduck joined #nim
08:45:06*cheatfate_ is now known as cheatfate
08:46:47*yglukhov joined #nim
08:52:57*arnetheduck quit (Ping timeout: 250 seconds)
08:58:28*arnetheduck joined #nim
09:05:57*arnetheduck quit (Ping timeout: 250 seconds)
09:18:26*yglukhov quit (Remote host closed the connection)
09:21:17*yglukhov joined #nim
09:22:00*elrood joined #nim
09:22:20*euantor joined #nim
09:26:40*desophos quit (Read error: Connection reset by peer)
09:28:48*brechtm quit (Read error: Connection reset by peer)
09:30:07*brechtm joined #nim
09:30:09*yglukhov quit (Remote host closed the connection)
09:35:32*Smaehtin joined #nim
09:41:30*Smaehtin quit (Quit: Page closed)
09:41:46*Smaehtin joined #nim
09:41:54*Smaehtin quit (Client Quit)
09:42:08*Smaehtin joined #nim
09:43:11*Smaehtin quit (Client Quit)
09:43:55*Smaehtin joined #nim
09:44:09*Smaehtin quit (Client Quit)
09:44:47*Smaehtin joined #nim
09:46:45*Smaehtin quit (Client Quit)
09:47:37*Martin_____ joined #nim
09:48:34*Martin_____ quit (Client Quit)
09:49:21*Smaehtin joined #nim
09:49:53*Smaehtin quit (Client Quit)
09:50:40*Smaehtin joined #nim
09:52:25*Smaehtin left #nim (#nim)
09:53:22*Smaehtin joined #nim
09:54:33*Smaehtin quit (Client Quit)
10:01:41*xet7 quit (Quit: Leaving)
10:08:18*EastByte_ is now known as EastByte
10:17:56*brechtm quit (Read error: Connection reset by peer)
10:18:01*brechtm_ joined #nim
10:30:40*yglukhov joined #nim
10:35:07*yglukhov quit (Ping timeout: 252 seconds)
10:47:02*WickedShell quit (Read error: Connection reset by peer)
11:01:40*Heul joined #nim
11:05:13*fredrik92 joined #nim
11:10:35vktecHeul: Please ask people in-channel pefore PMing them.
11:26:50*Heul left #nim (#nim)
11:28:17vktecWell.... that was not so fun
11:28:36vktecdom96: Any ideas why he claimed he could not send to this channel?
11:29:03bacteriusI had trouble sending on the freenode web client as well, I had to use hexchat to be able to talk
11:29:14bacteriusnot sure why
11:29:38vktecAh yes... I think I remember dom96 muting webchat due to a very persistent troll
11:29:42*trusion quit (Ping timeout: 246 seconds)
11:30:02vktecNot sure if this guy was the same one...
11:30:19vktecCould've been...
11:30:31vktecI had to /ignore :-/
11:33:15*yglukhov joined #nim
11:37:37*yglukhov quit (Ping timeout: 250 seconds)
11:43:30bacteriusthis metaprogramming stuff is nuts
11:44:32vktecbacterius: ikr
11:44:46vktecMetaprogramming ftw!
11:45:26bacteriusI'm trying to make a compile-time function that takes an object type and returns the sum of the size (via sizeof) of its fields
11:45:59vktecAt.... compile-time?
11:46:05vktecSurely that's a runtime operation?
11:46:25bacteriuswell like an object that has two fields, a uint32 and an int16, should return 6
11:46:26vktecOh, oops, I misunderstood
11:48:12Araqvktec: yes the troll is now PM'ing people
11:48:16bacteriusI found fieldPairs but if I only have the type I am unsure how to iterate through the fields
11:48:24*filcuc joined #nim
11:48:37vktecAraq: :(
11:48:51Araqbacterius: you can use macros.getType
11:51:09bacterius:o
11:53:55Araqbacterius: it seems wiser though to patch the compiler so that its size computations agree with clang/gcc
11:54:30Araqso that we can fully support 'sizeof' in const contexts
11:54:51bacteriusoh no, this isn't to emulate a C-like sizeof
11:54:57*Jesin quit (Ping timeout: 250 seconds)
11:55:04Araqit's risky though so it needs some decent tests
11:55:49bacteriuswhat I'm trying to do basically is an automatic way to pack/unpack simple objects into/from byte buffers, as part ofan embedded communication protocol
11:56:08bacteriusand I'm using metaprogramming to do the codegen
11:57:30bacteriusI was thinking of just using sizeof() and copyMem but when I realised Nim didn't support compile-time sizeof of objects it got me thinking that I probably didn't want to do that anyway
11:57:51AraqI see
11:58:02fredrik92ohh, bacterius, I'm doing stuff like that in C# (to do certain P/Invoke calls to the Windows API), and YES, that is crazy, always!!!! :D
11:59:57bacteriusfredrik92: P/Invoke is pretty cool, but from what I've seen Nim's codegen abilities are mind-bending
12:01:08vktecbacterius: They certainly are...
12:01:14*vktec 's mind is bent
12:01:16vktec;)
12:01:24*vktec straightens mind
12:01:28*vktec is back to normal
12:02:05fredrik92bacterius, I don't doubt it... But the C# Marshaler is pretty shitty for doing more complex stuff and you don't have compile-time support (not really...)
12:02:41fredrik92I'd prefer mind-bending codegen abilities anytime! :D
12:04:53fredrik92Araq, btw, I have started looking into SChannel wrappers for Nim (to replace OpenSSL dependencies) and now that I'm officiellay on holiday until mid-august, I think I can squeeze it into my Private-Fun-projects category :D
12:05:29Araqyay.
12:05:35Araqbut I gotta go, bbs
12:06:37*Matthias247 joined #nim
12:08:16*euantor quit (Remote host closed the connection)
12:08:41bacteriushmm what's wrong here?
12:09:44bacteriushttp://pastebin.com/SwqUmyAW
12:10:06bacteriusfrom what I see this macro should produce a literal integer 10
12:10:17bacteriusso I was expecting this to become "const ten = 10"
12:10:32bacteriusbut it says "value of type 'int literal(10)' has to be discarded"
12:22:58EastBytels
12:23:00EastBytewhoop
12:25:01*nsf joined #nim
12:32:47*TheLemonMan joined #nim
12:34:34*euantor joined #nim
12:45:24*PMunch joined #nim
12:46:56*Jesin joined #nim
12:47:49bacteriusargh what is wrong with this macro
12:49:50dom96bacterius: try changing ': stmt' to ': expr'
12:53:42bacteriusoh..
12:53:53bacteriusthat makes more sense
12:53:57bacteriusthanks! :)
13:03:07*PMunch quit (Quit: leaving)
13:07:13*TheLemonMan quit (Quit: "It's now safe to turn off your computer.")
13:14:32*xyz_ joined #nim
13:35:04*yglukhov joined #nim
13:36:29*euantor quit (Remote host closed the connection)
13:37:40*filcuc quit (Read error: Connection reset by peer)
13:39:23*yglukhov quit (Ping timeout: 244 seconds)
13:42:42*edub4rt joined #nim
13:51:40*NimBot joined #nim
13:51:43*zielmicha_ is now known as zielmicha
13:51:46*lyro joined #nim
13:52:05*Learath2 joined #nim
13:52:12*StarBrilliant joined #nim
13:52:30*disconnected joined #nim
13:52:51*cnu- joined #nim
13:52:52*cnu- quit (Excess Flood)
13:53:19*nchambers joined #nim
13:53:21*cnu- joined #nim
13:53:24*cnu- quit (Excess Flood)
13:53:52*cnu- joined #nim
13:54:21*bacterius quit (Quit: Leaving)
13:55:32dom96fredrik92: what's the problem?
13:56:35fredrik92everyone leaving and some coming back immediately... I now got a whole screen full of "<xzy> has quit" messages each within a few seconds of each other
14:03:19*mostworst joined #nim
14:03:43dom96fredrik92: likely one of the IRC servers dying, it happens.
14:07:27*bjz joined #nim
14:10:04*bjz_ quit (Ping timeout: 264 seconds)
14:20:28*euantor_ joined #nim
14:22:33*euantor quit (Ping timeout: 240 seconds)
14:26:15*yglukhov joined #nim
14:26:47*nsf quit (Quit: WeeChat 1.5)
14:31:02*mostworst quit (Ping timeout: 244 seconds)
14:38:24*mostworst joined #nim
14:43:21*beatmox quit (Remote host closed the connection)
14:43:34*beatmox joined #nim
14:45:31*beatmox quit (Remote host closed the connection)
14:45:44*beatmox joined #nim
14:47:26*beatmox quit (Remote host closed the connection)
14:47:40*beatmox joined #nim
14:51:08*akaisora_ joined #nim
14:54:43*euantor joined #nim
14:56:22*fredrik92 quit (Ping timeout: 272 seconds)
14:58:12*euantor_ quit (Ping timeout: 276 seconds)
15:02:09*euantor quit ()
15:03:53*edub4rt quit (Ping timeout: 250 seconds)
15:25:09*Jesin quit (Quit: Leaving)
15:27:31*Jesin joined #nim
15:33:46*mostworst quit (Ping timeout: 252 seconds)
15:44:48*Demon_Fox joined #nim
15:45:56*rolha joined #nim
15:46:05rolhahi everyone
15:46:27rolhaI'm starting to learn nim and have a basic question:
15:47:07rolhaI'm trying to execute a command with osproc's execProcess as execProcess("dosomething -foo " & $item) inside a loop
15:47:23rolhabut I get the error "Error: value of type 'TaintedString' has to be discarded"
15:48:38rolhahow can I can I execute it?
15:51:28rolhaah, wow, sorry. sorted :)
15:51:40rolhaI hadn't read the discard part of the manual yet
15:54:52*xyz_ quit (Ping timeout: 250 seconds)
16:05:45dom96hello rolha! Welcome to #nim. Glad you got it sorted out :)
16:05:58rolhadom96: thanks!
16:10:23*GangstaCat joined #nim
16:23:11*rolha quit (Ping timeout: 244 seconds)
16:26:02*akamaus quit (Ping timeout: 260 seconds)
16:49:07*GangstaCat quit (Quit: Leaving)
16:53:37*GangstaCat joined #nim
17:02:10*fredrik92 joined #nim
17:10:13*desophos joined #nim
17:22:09*rolha joined #nim
17:30:13*rolha quit (Remote host closed the connection)
17:31:06*rolha joined #nim
17:35:27*desophos quit (Ping timeout: 260 seconds)
18:05:21*mjanssen quit (Quit: leaving)
18:07:24dom96TIL Swift has really slow compile times https://twitter.com/kssreeram/status/746759308273029121
18:13:14Araqdom96: iirc that's the inventor of the Clay programming language
18:13:36*rolha quit (Quit: My Mac has gone to sleep. ZZZzzz…)
18:14:15dom96is it not this guy? https://github.com/jckarter
18:16:56*akaisora_ quit (Read error: Connection reset by peer)
18:17:14*nsf joined #nim
18:18:22dom96(who's now working at Apple on Swift it seems)
18:19:17dom96Actually, looks like you're right
18:21:17*akaisora_ joined #nim
18:22:32*rolha joined #nim
18:38:01*zaquest quit (Ping timeout: 252 seconds)
18:39:57*mostworst joined #nim
18:43:33*kssreeram joined #nim
18:44:52dom96hi kssreeram, nice to see you here :)
18:45:03kssreeramHey
18:45:17kssreeramJust reading about Nim. Looks like a nice language.
18:50:43Araqhi kssreeram, I used to be in #clay ;-)
18:51:09*rolha quit (Quit: My Mac has gone to sleep. ZZZzzz…)
18:51:11kssreeramCool!
18:51:28kssreeramWas Nim around back then?
18:51:32Araqyup
18:51:39*mostworst quit (Ping timeout: 260 seconds)
18:51:59kssreeramHeard about it only today on twitter from dom96.
18:53:29kssreeramEverything I see in Nim looks great..
18:53:56kssreeramExcept for the GC part. Not much of a fan of gc.
18:54:31dom96Surprised you didn't hear about it, it's been around for a while now.
18:54:50kssreeramThis article is a good intro: https://hookrace.net/blog/what-is-special-about-nim/
18:55:19kssreeramLove the meta programming features.
18:55:34kssreeramVery nice FFI syntax.
18:57:53*edub4rt joined #nim
18:58:13Araqkssreeram: well I'm not a fan of destructors ;-)
18:58:25kssreeramMe too!
18:58:34dom96Indeed, that is a very nice article (thanks def-!)
18:58:47Araqand the GC is "real-time" for some definition of real-time
18:59:04kssreeramSwift has a nice design that avoid destructors.
19:01:15kssreeramBut of course, it's lack of any real meta-programming features sucks.
19:01:22Araqyou mean the RC'ing memory management?
19:01:22dom96Interesting. How does it avoid the use of destructors?
19:03:02kssreeramYeah. RC memory management. So cycles aren't allowed. But it also complete does away with the ugly notion of references (like in C++ or Clay).
19:03:12kssreeram*s/complete/completely/
19:04:17Araqhow can you implement a 'view' on a hash table entry without them?
19:05:28*PMunch joined #nim
19:06:02kssreeramI don't know if you can.
19:06:16kssreeramThey do have views on arrays (slices).
19:06:36kssreeramBut I like the simplicity that results from these restrictions.
19:08:58kssreeramBy "I like", I mean as a target language for a compiler! :)
19:09:40kssreeramIt's too painful to directly write code in any language without good meta programming.
19:11:15*heretobang quit (Read error: Connection reset by peer)
19:14:36Araqkssreeram: alright, well that was what made me add 'var T' (&T) to Nim
19:15:04Araqmeta programming but you cannot even implement a hash table properly doesn't feel right ;-)
19:15:21Araqthough actually I can now think of alternatives
19:15:47*mcc joined #nim
19:21:14*akaisora_ quit (Read error: Connection reset by peer)
19:25:19Araqkssreeram: does Swift do any RC optimizations?
19:25:37kssreeramTheir solution is to just make Array/Hashtable etc special that have a bit of magic compiler support. That's pretty reasonable imo. It's not often that we have to implement a hashtable.
19:25:49kssreeramAraq: Yes. They do.
19:26:13kssreeramIf they can statically prove lifetime, then the compiler takes advantage of that.
19:27:13Araqany papers that have driven this design? the papers I know are of the sort "too little, too hard" ;-)
19:30:00kssreeramThis seems like a work in progress: https://github.com/apple/swift/blob/master/docs/ARCOptimization.rst
19:31:34kssreeramOther files in that directory may be useful. But I don't know. @jckarter on twitter should know if there is anything definitive.
19:32:35*rolha joined #nim
19:40:10Araqty
19:45:02*akaisora joined #nim
19:47:19*chrisheller quit (Ping timeout: 252 seconds)
19:52:25*Jesin quit (Quit: Leaving)
19:57:20*chrisheller joined #nim
20:05:43*akaisora quit (Read error: Connection reset by peer)
20:13:03*edub4rt quit (Ping timeout: 240 seconds)
20:18:35*chrisheller quit (Remote host closed the connection)
20:22:27*rolha quit (Quit: Textual IRC Client: www.textualapp.com)
20:29:25PMunchHmm as strings in Nim store both the data and length and capacity is there a way to convert a string of known length into a Nim string?
20:31:22*euantor joined #nim
20:32:13PMunchOh, RTFM..
20:32:50PMunchnim-lang.org/docs/manual.html#types-cstring-type: A $ proc is defined for cstring that return a string
20:43:54*akaisora joined #nim
20:48:21*WickedShell joined #nim
20:55:37fowlThat will go until it finds a \0 char
21:03:06*disconnected left #nim ("WeeChat 1.0.1")
21:06:54*couven92 joined #nim
21:07:10*brson joined #nim
21:10:10*euantor quit (Remote host closed the connection)
21:16:05*desophos joined #nim
21:18:35*fredrik92 quit (Quit: Shutting down...)
21:18:53*fredrik92 joined #nim
21:28:40*akaisora quit (Ping timeout: 250 seconds)
21:35:42*brson quit (Quit: leaving)
21:57:10*elrood quit (Quit: Leaving)
22:06:26*nande joined #nim
22:12:21*fredrik92 quit (Quit: Shutting down...)
22:19:24*der-landgraf quit (Quit: WeeChat 1.5)
22:47:29*GangstaCat quit (Quit: Leaving)
22:48:47*zaquest joined #nim
22:55:48*mostworst joined #nim
22:57:06*PMunch quit (Quit: leaving)
22:57:14*kssreeram quit (Quit: My Mac has gone to sleep. ZZZzzz…)
22:59:32*der-landgraf joined #nim
22:59:32*der-landgraf quit (Changing host)
22:59:32*der-landgraf joined #nim
23:07:06*brechtm_ quit (Read error: Connection reset by peer)
23:08:22*brechtm joined #nim
23:32:57*yglukhov quit (Remote host closed the connection)
23:36:35*yglukhov joined #nim
23:38:03*mostworst quit (Ping timeout: 246 seconds)
23:41:33*heretobang joined #nim
23:46:20*yglukhov quit (Remote host closed the connection)