<< 01-04-2015 >>

00:00:26a5iWell Nim is mostly associated with Python about syntax
00:01:23Varriount_I wouldn't say that Python's spirit of 'one obvious way' carries over to Nim...
00:02:15Araqthat's just a marketing phrase. Python has usually *lots* of ways to accomplish the same task
00:02:42Araqimport functools
00:03:12Araqlambdas and list comprehensions
00:03:58Araqnot to mention that dynamic typing gives so much flexibility that any notion of "there is only one way" is downright ridiculous
00:05:21a5ithats bad marketing...
00:05:32*rkj-b joined #nim
00:05:55*reem joined #nim
00:06:43a5ihey reem
00:07:45Araqgood night
00:07:53a5iNight
00:08:54*hellonico joined #nim
00:15:08*saml_ joined #nim
00:17:18*fizzbooz1 quit (Ping timeout: 264 seconds)
00:17:48*fizzbooz1 joined #nim
00:21:39reema5i: hello
00:28:08*BlaXpirit_ quit (Quit: Quit Konversation)
00:36:44*RandIter left #nim (#nim)
00:54:28*Sembei joined #nim
01:00:25*fizzbooz1 quit (Ping timeout: 255 seconds)
01:03:01*fizzbooz1 joined #nim
01:12:34*zama quit (Ping timeout: 252 seconds)
01:13:42*zama joined #nim
01:29:52reactormonkAraq, do you want to rename TChannel -> Channel at some point?
01:29:58reactormonkreem, o/ any questions?
01:29:59*Jehan_ quit (Quit: Leaving)
01:32:35*fizzbooz1 quit (Ping timeout: 256 seconds)
01:35:15reemreactormonk: Nope, just lurking. I said hello because a5i did (I know them from elsewhere on the internet).
01:36:13a5iI'm multiple people? :o
01:37:07*wb quit (Ping timeout: 256 seconds)
01:45:25*johnsoft quit (Ping timeout: 264 seconds)
01:45:47*johnsoft joined #nim
01:52:23*untitaker quit (Ping timeout: 252 seconds)
02:00:34*untitaker joined #nim
02:05:45reactormonkAraq, I'm currently messing with https://github.com/Araq/Nim/pull/1891 - what exactly should be the output on success/fail?
02:14:20*flexpaint joined #nim
02:14:24*flexpaint left #nim (#nim)
02:14:27*flaviu quit (Remote host closed the connection)
02:14:59*flaviu joined #nim
02:24:15*TEttinger quit (Quit: Leaving)
02:26:13*darkf joined #nim
02:48:23saml_lib/pure/oids.nim(80, 25) Error: ')' expected I get this
02:48:36saml_when I try to compile https://github.com/saml/helloweb/blob/master/hello.nim
02:52:19*vendethiel- joined #nim
02:54:12*vendethiel quit (Ping timeout: 242 seconds)
02:56:00*Jehan_ joined #nim
02:58:57saml_compiles fine after updating nim
02:59:32saml_asyncdispatch can this use multicore?
02:59:42saml_yet
03:03:24*infinity0 quit (Ping timeout: 246 seconds)
03:03:24*infinity0_ joined #nim
03:03:28*TEttinger joined #nim
03:03:37*infinity0_ quit (Changing host)
03:03:37*infinity0_ joined #nim
03:03:37*infinity0_ is now known as infinity0
03:04:08Varriount_saml_: Not quite yet.
03:04:36saml_ah i see
03:05:11*Jehan_ quit (Quit: Leaving)
03:06:17*coopernurse joined #nim
03:08:54*fizzbooze quit (Read error: Connection reset by peer)
03:13:26*brson joined #nim
03:21:13*brson quit (Quit: leaving)
03:21:57*fizzbooze joined #nim
03:53:06*saml_ quit (Quit: Leaving)
04:08:39*hellonico quit (Remote host closed the connection)
04:23:12*coopernurse quit ()
04:24:14*hellonico joined #nim
04:39:31*MagusOTB quit (Ping timeout: 264 seconds)
05:01:15*rkj-b quit (Quit: ChatZilla 0.9.91.1 [Firefox 36.0.4/20150320202338])
05:08:43*reem quit (Remote host closed the connection)
05:24:11*hellonico quit (Remote host closed the connection)
05:24:30*reem joined #nim
05:24:38*hellonico joined #nim
05:28:59*hellonico quit (Ping timeout: 246 seconds)
05:31:39*Senketsu joined #nim
05:31:51*reem quit (Remote host closed the connection)
05:36:48*reem joined #nim
05:56:46*hellonico joined #nim
05:58:50*hellonico quit (Remote host closed the connection)
05:59:55*polde joined #nim
06:03:14*hellonico joined #nim
06:24:52*hellonico quit (Ping timeout: 255 seconds)
06:25:36*BlaXpirit joined #nim
06:46:04*hellonico joined #nim
06:46:40*reem quit (Remote host closed the connection)
06:50:24*reem joined #nim
06:54:23*reem quit (Remote host closed the connection)
06:56:16*irrequietus joined #nim
07:00:12*Ven joined #nim
07:06:44*reem joined #nim
07:08:49*fizzbooze quit (Ping timeout: 265 seconds)
07:11:14*HakanD joined #nim
07:11:46*Varriount_ quit (Read error: Connection reset by peer)
07:12:16*Varriount_ joined #nim
07:25:33*reem quit (Remote host closed the connection)
07:26:03*gsingh93 quit (Ping timeout: 252 seconds)
07:30:57Araqreactormonk: no idea. just log something after every N-th iteration
07:32:03*reem joined #nim
07:33:26*reem quit (Remote host closed the connection)
07:36:50*reem joined #nim
07:37:57*reem quit (Remote host closed the connection)
07:44:17*Strikecarl joined #nim
07:44:57Strikecarlthe proc processID(p: Process)
07:44:58Strikecarlfunction
07:45:02Strikecarlam i supposed to do
07:45:21StrikecarlHow am i supposed to use that
07:45:39StrikecarlprocessID("Java.exe") / (Java.exe) / (Java)
07:45:42Strikecarlneither of those works.
07:46:40StrikecarlOr am i gonna do like
07:46:56StrikecarlProcess = "java.exe"
07:47:06Strikecarlthen just processID(inthere) ?
07:47:10gokrIt says p is of type Process, not string.
07:47:35StrikecarlHow do i tell that Java.exe is a process then?
07:48:30Araqyou can only ask for the ID of a process that you created via some call in osproc on your own
07:48:41StrikecarlOh.
07:48:47Araqthis has nothing to do with the task manager
07:48:59Strikecarloh :facepalm:
07:48:59Araqyou need to use the WinAPI for what you're after
07:49:12StrikecarlI already made something similar with execCmd
07:53:14fowlmouthyou can probably hack osproc to do what you want
07:54:23fowlmouthif you can figure out the winapi
08:03:01*Strikecarl quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
08:14:27*reem joined #nim
08:14:54*Demon_Fox quit (Quit: Leaving)
08:17:12*MyMind joined #nim
08:20:30*polde quit (Ping timeout: 276 seconds)
08:20:56reactormonkAraq, doesn't log anything besides that it's sleeping
08:21:12*Trustable joined #nim
08:22:33*UberLambda joined #nim
08:23:38Araqreactormonk: you should adapt the test to our liking
08:28:35reactormonkAraq, I could hook it up to R
08:29:03Araqtests are better with fewer dependencies
08:29:19reactormonkwhich parameters should go in? Runtime 15m proper seems good, different backends?
08:29:27reactormonkI mean you gotta display the results, it's not simple 0/1 test
08:30:06reactormonkI could also fiddle in some simple linear regression and check that the slope isn't too big
08:31:54Araqthe test needs to be a new category btw that is normally not run
08:32:10Araqtests we only run manually
08:32:52reactormonknaturally
08:35:17reactormonkSo which parameters would oyu like to test?
08:36:01*polde joined #nim
08:37:28Araqthat it doesn't crash and doesn't leak
08:37:44Araqalso some threading would be nice
08:37:47reactormonka) is easy b) needs some more
08:37:54reactormonkdefine "some threading"
08:38:07reactormonkand which input parameters? different GCs?
08:38:08Araqlook at our GC tests they show you how to do b)
08:38:47Araq"some threading" -- the DLL should create a dummy thread that allocates
08:39:01Araqand it's checked that this doesn't leak either
08:39:19reactormonkso the dummy thread should allocate and then die?
08:39:38Araqyes
08:39:43Araqbut run for a while
08:40:07*UberLambda quit (Quit: Leaving)
08:40:26Araqand be careful: getOccupiedMem() et al are *thread local*
08:40:52reactormonkuh-oh.
08:40:57reactormonkAny way to get a local variant?
08:41:20Araqso the thread that allocates needs to do its own checking
08:41:20reactormonkor is the GC thread-local anyway?
08:41:23Araqbut that's not hard
08:41:31Araqthe GC is thread local
08:42:13reactormonk... how do you pass stuff around?
08:43:21Araqusually via a TChannel
08:43:39reactormonkany plans to change that to Channel?
08:45:24Araqeventually we'll have better channels which then get the nicer name
08:45:32reactormonkok
08:45:45Araqsame with TThread
08:45:46reactormonkhow well does nimsuggest work? If well enough, I'll take a look at nim-mode again
08:45:56reactormonkit sucks a bit atm
08:46:03Araqworks fine for me
08:46:09reactormonkok, I'll take a look then
08:57:20*reem quit (Remote host closed the connection)
09:13:09*polde quit (Ping timeout: 276 seconds)
09:14:13*milosn quit (Ping timeout: 252 seconds)
09:14:27*polde joined #nim
09:20:12Vennim still uses Pascal-casing?
09:20:53Ven(and hungarian notation)
09:23:54*jefus__ joined #nim
09:24:30AraqVen: no. it doesn't. there are only some artifacts left
09:24:39VenAraq: I'm really happen to hear that :)
09:24:58*reem joined #nim
09:27:15*reem quit (Remote host closed the connection)
09:27:32*jefus_ quit (Ping timeout: 265 seconds)
09:32:02*reem joined #nim
09:36:29*reem quit (Ping timeout: 245 seconds)
09:36:30*Ven quit (Read error: Connection reset by peer)
09:41:43*Ven joined #nim
09:47:22*Ven quit (Ping timeout: 244 seconds)
09:47:51*hellonico quit (Remote host closed the connection)
09:49:58*Ven joined #nim
09:51:41*novist quit (Quit: ZNC - http://znc.in)
09:52:22federico3I'd love to see usage examples and tips in the module documentation
09:52:45pigmejfederico3: +1
09:54:07federico3are patches to the documentation accepted?
09:55:51def-federico3: absolutely
09:56:00nulpunkthi, I'm trying to classify some errors with nim. This is what I expected to work: https://gist.github.com/nulpunkt/b01e7a443039c8b57c18
09:56:10nulpunktcan anyone tell why the first test fails?
09:56:41nulpunktit always sets the type to phperror, not stacktrace as I expected
10:00:27*novist joined #nim
10:01:35def-nulpunkt: seems to be the space, works with re"stack\strace:"
10:03:52*BlaXpirit quit (Quit: Quit Konversation)
10:04:00nulpunktdef-: Thank you!
10:04:07nulpunktI was going insane over that :D
10:04:09def-nulpunkt: but it should work as you do it, i think
10:04:22nulpunktyes, with \s it works!
10:06:58def-Looks like a bug in the re module to me, it works with nre: https://gist.github.com/def-/52cacd2a6e527b93ff42
10:08:10def-with the re module you can also do \040 instead of a space, that also works
10:09:43def-ok, the reason is that re uses extended REs, you can disable that like this: if e.lines.contains(re("stack trace:", {})): ...
10:10:00def-extended REs ignore whitespaces and # comments
10:14:39*milosn joined #nim
10:15:32*milosn quit (Read error: Connection reset by peer)
10:19:37*milosn joined #nim
10:20:59*milosn quit (Read error: Connection reset by peer)
10:24:37*milosn joined #nim
10:27:33*UberLambda joined #nim
10:27:43nulpunktdef-: ah ok!
10:29:33nulpunktdef-: so what should "stack trace" be read as, with extended RE, do you know?
10:30:02def-stacktrace
10:30:10Araqdef-: that's not a bug, that's documented in bold
10:30:15nulpunktoh
10:31:04def-Araq: yes, i noticed
10:31:47Araqnulpunkt: foo.contains("stack trace:") works anyway, no need for a regex
10:31:48*UberLambda quit (Ping timeout: 244 seconds)
10:32:05*milosn quit (Read error: Connection reset by peer)
10:32:56*milosn joined #nim
10:34:57nulpunktAraq: Yes, that is true
10:35:27nulpunktThanks for all the help! :)
10:40:53*wb joined #nim
10:43:53*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:44:22*milosn quit (Ping timeout: 256 seconds)
10:46:10*HakanD quit (Quit: Be back later ...)
10:51:18*HakanD joined #nim
10:55:16*arnetheduck joined #nim
10:56:09*flaviu quit (Read error: Connection reset by peer)
10:56:58*flaviu joined #nim
10:59:43*milosn joined #nim
11:04:43*jefus__ quit (Read error: Connection reset by peer)
11:06:01*Kingsquee quit (Quit: Konversation terminated!)
11:10:09*davidhq joined #nim
11:11:30*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:11:35*TEttinger quit (Ping timeout: 244 seconds)
11:14:36*jefus joined #nim
11:16:35*milosn quit (Read error: Connection reset by peer)
11:17:11*milosn joined #nim
11:19:37*milosn quit (Read error: Connection reset by peer)
11:21:44*Ven joined #nim
11:22:14*milosn joined #nim
11:22:42federico3what's the recommended way to implement a small number of IO-bound thread-like "entities" that send data to a central entity every few second? threads+channels or asyncdispatch or..?
11:23:53Araqthreads+channels
11:24:40*milosn quit (Read error: Connection reset by peer)
11:27:15*milosn joined #nim
11:30:46federico3thank you!
11:32:41*milosn quit (Read error: Connection reset by peer)
11:33:05*milosn joined #nim
11:33:53dom96if it's IO-bound I would probably go with asyncdispatch
11:35:29federico3ouch :)
11:38:18Araqdom96: he said "small number of"
11:38:53Araqand as long as you yourself consider async unstable, I feel bad for suggesting it.
11:38:59dom96fair enough
11:42:39*polde quit (Ping timeout: 276 seconds)
11:42:56*milosn quit (Read error: Connection reset by peer)
11:43:28*milosn joined #nim
11:46:29dtscodeasync is still unstable?
11:48:14*polde joined #nim
12:00:27*flaviu_ joined #nim
12:01:04*flaviu_ quit (Client Quit)
12:05:23*milosn quit (Read error: Connection reset by peer)
12:11:03*milosn joined #nim
12:14:52*banister joined #nim
12:14:56*banister quit (Max SendQ exceeded)
12:15:11*HakanD_ joined #nim
12:15:31*banister joined #nim
12:18:14*HakanD quit (Ping timeout: 244 seconds)
12:20:18*milosn quit (Ping timeout: 244 seconds)
12:37:22*silven quit (Quit: No Ping reply in 180 seconds.)
12:38:39*silven joined #nim
12:44:33*HakanD__ joined #nim
12:44:33*HakanD_ quit (Read error: Connection reset by peer)
12:54:14*mpthrapp joined #nim
13:07:09*polde quit (Ping timeout: 276 seconds)
13:08:14*polde joined #nim
13:25:40*milosn joined #nim
13:31:54*wb quit (Ping timeout: 245 seconds)
13:35:53AraqI'm planning to rename 'expr' to 'untyped' and 'stmt' to 'typed' for templates/macros. any objections?
13:36:08Araqthe new names reflect reality much better
13:36:47Araqand it's intuitively obvious that template foo(x) means the same as template foo(x: untyped) ;-)
13:40:48*johnsoft quit (Ping timeout: 265 seconds)
13:43:37*HakanD__ quit (Quit: Be back later ...)
13:44:11*HakanD__ joined #nim
13:44:43*milosn quit (Read error: Connection reset by peer)
13:45:15*milosn joined #nim
13:45:26*johnsoft joined #nim
13:46:34*HakanD__ quit (Read error: Connection reset by peer)
13:47:26*BitPuffin joined #nim
13:48:11*itPuffinB joined #nim
13:51:45*BitPuffin quit (Ping timeout: 244 seconds)
13:52:16*itPuffinB quit (Ping timeout: 244 seconds)
13:54:23*EXetoC joined #nim
13:56:15arnetheduckhttps://github.com/Araq/Nim/pull/2428 awaits your reviewing pleasure ;)
13:59:29nulpunktIs there a way to map over an iterator?
13:59:46arnetheducka question also.. openArray, array, varargs and seq all look pretty similar, when trying to decide what parameter to take.. specially varargs and openArray - any plans for the future there?
13:59:57arnetheducka question also.. openArray, array, varargs and seq all look pretty similar, when trying to decide what parameter to take when writing a function.. specially varargs and openArray - any plans for the future there?
13:59:58*BitPuffin joined #nim
14:00:40def-nulpunkt: iterutils library could do that if it compiled with the current nim compiler
14:01:02*mwbrown joined #nim
14:01:50nulpunktthat would be sweet
14:02:03nulpunktI have an iterator errorFromStdin(): string
14:02:04*BlaXpirit joined #nim
14:02:05*milosn quit (Read error: Connection reset by peer)
14:02:21nulpunktand saying errorFromStdin().map(doStuff) would just be excelent :)
14:02:44*milosn joined #nim
14:03:06Araqarnetheduck: how does it affect bootstrapping times?
14:03:36Araq"BUGFIX: We have to split long strings into many ropes. Otherwise this could trigger an internalError()." -- you got rid of this by smarter buffer handling? ok
14:06:00arnetheduckno effect on bootstrap times that I can tell, takes about 2.8s to run koch boot -d:release both before and after on my machine
14:06:41arnetheduckit seemed more reasonable to read file in blocks than reading it in rope lengths (since the os will block-read anyway)
14:06:57*polde quit (Ping timeout: 276 seconds)
14:07:50arnetheduckfewer system calls that way
14:08:27*polde joined #nim
14:08:42EXetoCthat quick?
14:09:08EXetoCyou're right
14:09:31arnetheduckwell, at least when there are no .cc rebuild
14:14:59*wb joined #nim
14:17:53*Johz joined #nim
14:17:57*tumult joined #nim
14:19:55Araqarnetheduck: unfortunately I cannot merge your PR anymore :P please resubmit
14:20:13Araqso .. nobody cares about typed/untyped?
14:21:23pigmejAraq: I do
14:21:36pigmejand well, for me expr vs statement was ok
14:21:40gokrarnetheduck: "openArray, array, varargs and seq all look pretty similar". array is a fixed size array. seq is dynamic size. openarray can ONLY be used as a proc parameter type and will allow both arrays and seq (so its a good choice for most procs). And varargs is not at all the same, that's ability to take an unknown number of parameters.
14:21:44arnetheduckmerge devel or rebase? likely whitespace conflict
14:23:28*Strikecarl joined #nim
14:23:32AraqI have no opinion on rebase vs merge. I think git should have decided this question for us years ago but let's not discuss this here.
14:23:50gokrAraq: typed vs untyped sounds like something very different from stmt/expr. But I haven't used macros much at all.
14:24:03gokrSo its not statement vs expression anymore?
14:24:08Araqgokr: exactly.
14:24:24Araqthe language evolved to the point where the old names make no sense anymore
14:24:25arnetheduckneither do I, but some people are religious about it so it's safer to ask
14:24:34gokrWell, then I agree - if it just means that "this guy we know the type of" and "this guy dunno" - then that's more fitting.
14:25:50gokrI haven't really looked much at the "statements vs expressions" in Nim btw, but there still is a difference, right?
14:26:04Araqright.
14:26:10arnetheduckgokr, that may be so, but when I'm writing a function that takes a list and I just want to iterate over the items, I don't care what kind of list it is (seq, array, varargs).. that seems to have been the intention of openArray, kind of
14:26:18Araqand my attempts to further unify them saw no love in #nim :P
14:26:39gokrOh, personally I love having them unified. As in Smalltalk. :)
14:26:52Araqarnetheduck: varargs is the same as openarray
14:27:00gokrarnetheduck: But... varargs is NOT a list.
14:27:02gokrAs I wrote.
14:27:15Araqwith the exception that 'varargs[expr]' is a special case
14:27:27Araqand the other difference is this:
14:27:28gokrIf you don't care then yes, use openarray and that will allow both arrays and seqs to be passed.
14:27:43AraqtakesVarags(1, 2, 3) # works
14:27:54AraqtakesOpenArray(1, 2, 3) # doesn't work, use []
14:28:09AraqtakesOpenArray([1, 2, 3]) # works
14:28:33gokrI was wondering btw, I noticed the example for... "interface" on Rosetta, it shows a typeclass called "Container" that defines len and iterator basically.
14:28:46gokrCould that be used instead of openarray and offer even more flexibility?
14:28:53Araqyes.
14:29:01gokrThat would be quite slick.
14:29:11Araqonce we have a stable 'concept' feature, that is
14:29:23gokrWhere is Zahary? Get typeclasses going! :)
14:29:24Araqtype classes are now called 'concept'
14:29:29gmpreussner|worktakesOpenArray(1, 2, 3) # doesn't work, use [] <---- i think that this is ok
14:29:30gokrAh. ok :)
14:29:55gmpreussner|workAraq: is anything going to change with 'concepts'?
14:30:01gmpreussner|workor is it the same as before?
14:30:06gokrgmpreussner|work: Hum? openarray is not varargs.
14:30:15pigmejAraq: some examples when statemen / expr doesn't make sense ?
14:30:32gmpreussner|workgokr: what i'm saying is that the usage of [] is ok. i would not expect varargs to work with openarray params
14:30:42Araqgmpreussner|work: the spec changed slightly to be easier to implement.
14:30:51gmpreussner|workAraq: is that checked in yet? :)
14:31:18Araqyes but the feature is still implemented as a ridiculous hack in my book.
14:31:37gmpreussner|workoh well, as long as it works...
14:31:47Araqit's not hard to fix though, the code is comparatively simple
14:32:03gmpreussner|workso the syntax is something like "Foo = concept" now?
14:32:10Araqyes
14:32:12gmpreussner|worksweet
14:32:14gokrSo AFAIK concepts looks brutally slick - but its still "just" generics, right?
14:32:22Araqgokr: right.
14:32:46Araqbut I think fowlmouth is working on something that turns them into interfaces
14:32:53arnetheduckthere, rebased
14:32:55gokrI am trying to ... visualize in my head what that means vs interfaces.
14:33:24Araqit's really simple: heterogenous container --> requires runtime dynamism aka interface
14:33:27*pafmaf joined #nim
14:33:36Araqhomogenous container --> concept is fine
14:33:39gokrTrue, that's obvious.
14:33:49gokrAnd I guess they also don't work well with methods?
14:34:10gokrOr perhaps that doesn't matter.
14:34:13Araqheh, quite likely
14:34:51Araqbut if we provide 'interface' via some form of concept+macro, it won't matter
14:35:04Araqand in fact, we might be able to remove 'method' from the language
14:35:05gokrBut if they could be extended to provide interface, that would... be VERY nice.
14:35:14gmpreussner|workwell, we probably don't want it to be interfaces in the traditional sense, i.e. something you need to implement. i suppose it's still more like type classes in Haskell or duck typing in other languages?
14:35:43gmpreussner|workso if your type has matching functions then the concept will be fulfilled
14:35:44gokrgmpreussner|work: I am all with you there, much nicer to put the constraints from the "outside".
14:36:03gokrLike Go does if I grokked it.
14:36:09gokrExact.
14:36:23*polde quit (Ping timeout: 265 seconds)
14:36:25gmpreussner|workthe only downside of that approach is that, if the concept changes, you don't know which types may break
14:36:36gmpreussner|workbut i still like it better than interfaces
14:36:41gokrI agree.
14:37:03gokrAnd the idea of "if it compiles" - that's just... neat.
14:40:30Araqha, the underlying implementation really *does* check "if it compiles" for 'concept'
14:40:47Araqit was built upon the system.compiles primitive
14:43:18*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:43:51*milosn quit (Ping timeout: 252 seconds)
14:45:59*jefus_ joined #nim
14:48:46*jefus quit (Ping timeout: 252 seconds)
14:53:34*Ven joined #nim
14:54:46gokrAraq: I presumed it did actually. Its an interesting idea.
15:03:15*polde joined #nim
15:04:03gmpreussner|workthat's what i expected as well
15:04:40gmpreussner|workbut i'm sure Araq has a better implementation in his little bag of tricks :)
15:06:37*HakanD__ joined #nim
15:07:57*darkf quit (Quit: Leaving)
15:10:22*HakanD___ joined #nim
15:13:50*HakanD__ quit (Ping timeout: 250 seconds)
15:13:59Araqgmpreussner|work: in the long run I expect system.compiles to become more like "valid operation?" instead of "try to compile this"
15:14:27Araqsystem.compiles is a *hack*
15:15:55*Johz quit (Quit: Leaving)
15:20:46*johnsoft quit (Ping timeout: 250 seconds)
15:28:15*pafmaf quit (Quit: This computer has gone to sleep)
15:32:55*Strikecarl quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
15:33:50*pafmaf joined #nim
15:36:43*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
15:39:33*arnetheduck quit (Ping timeout: 248 seconds)
15:39:48*johnsoft joined #nim
15:47:33*Ven quit (Ping timeout: 248 seconds)
15:48:16*mwbrown quit (Ping timeout: 255 seconds)
15:52:17*mwbrown joined #nim
15:52:37*pafmaf_ joined #nim
15:52:45*wb__ joined #nim
15:52:49EXetoC"I dabbled in both d and nim/rod. All interesting in nim is whats taken from d."
15:52:57EXetoCAraq: I knew it! the D hate was just a cover
15:53:54*yymoto2 joined #nim
15:55:14*wb quit (Ping timeout: 244 seconds)
15:55:37*pafmaf quit (Ping timeout: 264 seconds)
15:57:09*dhertz joined #nim
16:02:03*pafmaf joined #nim
16:04:01*pafmaf_ quit (Ping timeout: 264 seconds)
16:10:43*tumult quit (Ping timeout: 246 seconds)
16:16:36*milosn joined #nim
16:18:29*HakanD___ quit (Quit: Be back later ...)
16:21:41*yymoto2 quit (Quit: leaving)
16:22:12gmpreussner|workAraq: i have a big announcement to make
16:22:25gmpreussner|workNim is basically obsolete by the time v1.0 is released
16:22:32gmpreussner|worki created a new fork, called Nim++
16:22:41gmpreussner|workit's like Nim, but with classes!
16:23:26EXetoCcool
16:24:11EXetoCI've already started on Oim though
16:25:54elbowToo bad I'm Releasing Pim in two days.
16:32:23*polde quit (Ping timeout: 265 seconds)
16:33:20*brson joined #nim
16:35:54flyxis it planned for the VM to support ptr types somewhen?
16:36:19AraqEXetoC: yeah right. because D has AST based macros ...
16:36:28Araqand typesafe bitsets and enums
16:36:37Araqand thread local GCs
16:36:51Araqetc etc
16:38:01EXetoCd(:)|<
16:38:09*Jehan_ joined #nim
16:38:17Araqbut hey, everybody is exposing his ignorance as good as he can I guess
16:39:17Jehan_Am I missing something exciting?
16:39:26Jehan_Or just standard April Fools fare?
16:41:56Jehan_Hmm, reading up on the log and am suddenly wondering: is there any deeper reason behind redoing "generic" under a different name ("concept") or is it just a keyword rename?
16:44:44*askatasuna joined #nim
16:46:56def-Jehan_: https://github.com/Araq/Nim/issues/990
16:47:35AraqJehan_: 'generic' was picked because it was a "free" keyword
16:47:40Jehan_Gotcha.
16:48:08Jehan_I thought it had been inspired by Ada.
16:48:11Jehan_Hmm, whatever.
16:48:13Araqand now that we're starting to put it into shape, a nicer name is required
16:49:28Jehan_Wouldn't have been my first pick, but, eh, bikeshedding. :)
16:50:30Araqoriginally 'generic' was for something like Rust's "impl"
16:51:33flyxis it possible to use methods in the VM? ptr types do not work at all, and ref types do not work well, but using an object type directly isn't polymorphic, right?
16:51:43Jehan_Out of curiosity, though: Why not trait, interface, or signature? Concept sounds pretty close to the C++ thing.
16:52:27Jehan_Ah, nevermind, I saw your post on GitHub.
16:55:18Araqflyx: I don't think these work in the VM right now. what are you doing at compile-time?
16:56:06flyxAraq: trying to extend my html templating library with template inheritance
16:56:40flyxwell I *could* implement dynamic dispatch by hand
16:56:50Araqyou can simply override the templates I think
16:57:02Araqunittest module makes use of that feature
16:57:23Araqnot sure I like it though and it definitely needs to be documented at least
16:59:33*polde joined #nim
17:05:47*davidhq joined #nim
17:14:49*pafmaf quit (Ping timeout: 264 seconds)
17:19:12flyxthey're not templates as in the Nim feature
17:22:53flyxanyway, I guess I can solve most of the stuff I want to do without methods at compile time
17:24:26*wb__ quit (Ping timeout: 256 seconds)
17:24:45*fizzbooze joined #nim
17:30:11Araqflyx: well the VM is turing complete, so yeah :P
17:31:18flyxthat was my thought exactly
17:33:23*gsingh93 joined #nim
17:35:42flyxis it possible to write a macro that takes a proc as parameter and depending on some condition either calls it directly or returns an AST that contains a call to the proc?
17:35:43*gokr_ joined #nim
17:36:26flyxI don't think it is, but perhaps I'm wrong
17:38:03*emilsp quit (Remote host closed the connection)
17:40:06*gimir3h joined #nim
17:43:46*gimir3h quit (Quit: Leaving)
17:44:07Araqflyx: it is with the new macros.getType API (in devel)
17:45:03*gimireh joined #nim
17:47:04flyxuh, nice
17:47:37*gimireh quit (Quit: gimireh)
17:56:54*fizzbooze quit (Ping timeout: 245 seconds)
18:06:19*Senketsu quit (Quit: Leaving)
18:09:08*brson quit (Quit: leaving)
18:10:18*emilsp joined #nim
18:24:16*wb joined #nim
18:26:34flyxhow do I get a devel nim compiler? just checking out devel and calling ./koch boot -d:release fails
18:27:14gmpreussner|workflyx: follow the instructions on the readme page on github
18:28:35flyxthey do not tell me to checkout devel
18:28:49flyxso I would build on master
18:29:05flyxbut if I checkout devel, koch doesn't build
18:29:22def-flyx: bootstrap from devel csources
18:29:45def-best to follow the instructions from a fresh clone
18:31:51flyxah yes. my csources clone didn't have a devel branch, so I had to re-clone it
18:31:55flyxnow it works
18:43:48*yglukhov joined #nim
18:44:26*fizzbooz1 joined #nim
18:47:48yglukhovHello everyone!
18:47:50flyxAraq: how would I use getType in my use-case? the proc is already a NimNode in the macro body, so I cannot call it directly. if I use a template, I get the proc as proc type, but cannot return a generated AST
18:48:44*BlaXpirit quit (Read error: Connection reset by peer)
18:49:27*BlaXpirit joined #nim
18:56:04*Senketsu joined #nim
18:57:25*wb quit (Ping timeout: 248 seconds)
18:58:47Araqflyx: getType works on the NimNode
18:58:57Araqyglukhov: welcome
18:59:12Araqmacro foo(x: stmt) =
18:59:17Araq let t = x.getType
18:59:25Araqnote the 'stmt' here
18:59:43Araqwhich is why I like to rename expr/stmt to untyped/typed
19:00:06flyxyeah, but how do I call x directly? x() obviously doesn't work
19:00:26Araqconstruct a call AST?
19:00:39flyxno, I want to call it at compile time
19:01:13flyxwhile the macro is being processed
19:02:14yglukhovAraq: thanx!
19:03:45yglukhovAraq: sorry to bother you, but do you mind giving some feedback on my PRs to js/dom.nim?
19:04:11yglukhovAraq: like do you consider them reasonable? =)
19:05:19TrustableNew PR for Aporia ready: https://github.com/nim-lang/Aporia/pull/80 :)
19:05:34Araqflyx: template foo(x: stmt) =
19:05:35Araq when someMacro(x):
19:05:37Araq static:
19:05:38Araq x()
19:05:40Araqbut untested
19:06:04Araqyglukhov: haven't looked at them yet
19:07:12yglukhovAraq: ok
19:07:32reactormonkAraq, how do I ensure stuff works with `spawn`?
19:07:58Araqwrite a test?
19:08:31reactormonkgood enough
19:08:37reactormonkmaybe there was something fancy
19:08:43Araqthere is even some option to order the output so you can make 'echo' in a spawn deterministic
19:08:56flyxAraq: the thing I still miss is how I either call x or generate an AST containing a call to x that will be executed at runtime
19:09:10reactormonkI assume there's some `spawn` tests I could look up?
19:09:12flyxin the template, I can call x directly but cannot generate an AST
19:09:33Araqreactormonk: there is a test in threads
19:09:39reactormonkperfect
19:10:41Araqflyx: when foo(): static x() else: macroCreatingCall() ?
19:11:12gmpreussner|workAraq: is there a mechanism in the stdlib to control FPU rounding modes?
19:12:13flyxAraq: almost. now the proc has one parameter, which is a second parameter to the template. when I pass that to the macroCreatingCall, what arrives is just an nnkIdent of the parameter of the template, not the original parameter
19:13:16flyxtemplate foo(x: stmt, p: expr):
19:13:16flyx when foo(): static x() else: macroCreatingCall(x, p)
19:15:17def-gmpreussner|work: fenv
19:15:26gmpreussner|workthanks
19:15:29flyxI think I have to do this in another way
19:15:59*wb joined #nim
19:16:26Araqflyx: well p: expr means it is not resolved
19:16:37Araqp: stmt should change that
19:16:42flyxah
19:16:51flyxI see why you want to rename them
19:16:59flyxthat wasn't clear to me
19:19:45Jehan_Araq: Speaking of which: are there going to be a lot of compatibility-breaking changes to `template` when I update Nim to the current devel version or are those changes still something for the future?
19:21:51*singul42 joined #nim
19:22:13singul42good evening
19:25:39EXetoCflyx: it works with static? it didn't for me
19:25:48flyxI'm still testing it
19:26:00EXetoCok
19:29:04*MyMind quit (Ping timeout: 272 seconds)
19:29:41flyxthis is my code currently: https://gist.github.com/flyx/46b34c8acceb99e94ee3
19:29:50*quasinoxen joined #nim
19:29:50*quasinoxen quit (Client Quit)
19:30:00flyxI get: test.nim(27, 32) Error: value of type 'string' has to be discarded
19:30:05flyxnot sure where that comes from
19:30:24flyxI can probably do things somewhat easier, I guess
19:30:27*quasinoxen joined #nim
19:30:30*infinity0 quit (Remote host closed the connection)
19:39:25def-flyx: try making the return value of createFilterCall expr
19:39:32def-flyx: but still fails with a C compilation error for me
19:40:21flyxgot it to work: https://gist.github.com/flyx/46b34c8acceb99e94ee3
19:40:45flyxI mustn't use static: because the value won't be available at runtime. const works though
19:41:38AraqJehan_: news.txt says this:
19:41:44flyxnow I *guess* I'm doing a lot of premature optimization with that
19:41:58flyxbut I wanted to see if it's possible
19:42:35Araq - Parameter names are finally properly ``gensym``'ed. This can break
19:42:37Araq templates though that used to rely on the fact that they are not.
19:43:02Araqthen there will be the expr/stmt rename but this will have a clear deprecation path
19:43:17Araqand then I will try to deprecate .immediate
19:43:27Araqbut whether this will work out is unknown
19:43:43Jehan_Yeah, the {.immediate.} deprecation is what I was wondering about.
19:45:03flyxwhy the immediate deprecation?
19:46:00Araqflyx: because in theory there is no difference between template foo(x, y: untyped) and template foo(x, y: untyped) {.immediate.}
19:46:29flyxhmm, and same for macros, I guess
19:48:58Jehan_Hmm, but what with: foo(x: sometype, y: untyped)?
19:49:47Araqtry an immediate for it and swoosh 'sometype' is not even type checked!
19:49:59flyxI wonder if I can generify my code to work with procs taking an arbitrary number of parameters
19:50:26Araqflyx: btw you can generate a 'static' section as an AST too
19:50:41Araqwhich should be much easier than your weird template/macro mix
19:51:50reactormonkAraq, how is FFI reflected in the effects system?
19:52:23flyxAraq: I'll try
19:52:36Araqreactormonk: whatever you write down for the FFI proc is assumed to hold. proc foo() {.importc, noSideEffect.}
19:52:58*fizzbooz1 quit (Ping timeout: 265 seconds)
19:54:41AraqJehan_: the real problem is that .immediate templates are resolved early within a generic... This cannot be emulated with the new scheme easily
19:54:59Jehan_Hmm.
19:55:49Jehan_My concern, right now, was honestly more for the breakage of existing code. :)
19:55:56reactormonkAraq, so no side effect? O.o sounds bad to me
19:59:43Araqreactormonk: learn to read
19:59:55*HakanD___ joined #nim
20:00:44reactormonkAraq, what's the default? No effect annotation at all, so unkown sideffect?
20:01:17Araqunknown sideeffect is the same as sideeffect
20:02:43flyxit worked: https://gist.github.com/flyx/46b34c8acceb99e94ee3
20:05:12Araqflyx: this is futil as soon as I fixed static[T] properly. then the compiler will do the same that you emulate
20:05:15Araq*futile
20:07:44*gokr_ quit (Ping timeout: 245 seconds)
20:07:55flyxgreat
20:08:59*singul42 quit (Quit: Page closed)
20:08:59*gokr_ joined #nim
20:13:21EXetoCstatic[T] yaay
20:15:22*fizzbooz1 joined #nim
20:15:26*nande joined #nim
20:16:27*jefus_ is now known as jefus
20:27:22*Kingsquee joined #nim
20:36:01*reem joined #nim
20:37:05*quasinoxen quit (Remote host closed the connection)
20:39:27*quasinoxen joined #nim
20:40:21*HakanD___ quit (Quit: Be back later ...)
20:40:53*HakanD___ joined #nim
20:45:09*HakanD___ quit (Ping timeout: 248 seconds)
20:47:28*HakanD___ joined #nim
20:51:27*BitPuffin quit (Ping timeout: 265 seconds)
20:53:13*a5i quit (Quit: Connection closed for inactivity)
21:02:46*Varriount_ is now known as Varriount
21:03:40*dhertz quit (Ping timeout: 246 seconds)
21:04:35VarriountOh yay, Nim's Wikipedia article is under threat again.
21:04:42VarriountWhat is it with these people?
21:05:45*mpthrapp quit (Remote host closed the connection)
21:14:11*HakanD____ joined #nim
21:14:11*HakanD___ quit (Read error: Connection reset by peer)
21:23:04*fizzbooz1 quit (Ping timeout: 272 seconds)
21:31:09*reactormonk quit (Quit: WeeChat 1.1)
21:35:01qwryou just need to get yellow tabloids writing how nim is sexy, that would make it notable for wikipedia ;)
21:37:54*HakanD____ quit (Quit: Be back later ...)
21:41:31*reem quit (Remote host closed the connection)
21:44:30*BlaXpirit quit (Quit: Quit Konversation)
21:46:02*mwbrown quit (Ping timeout: 252 seconds)
21:50:30dom96I find it funny how at every turn WP has a rule to point out why Nim should be deleted.
21:50:48*BitPuffin joined #nim
21:50:57dom96"Other less notable PL articles exist" -> WP:OTHERSTUFFEXISTS
21:51:16dom96"Lots of people voted to keep this article" -> WP:CANVASSING
21:53:22flaviudom96: You can't possibly say that WP:CANVASSING isn't applicable here.
21:53:40*Trustable quit (Remote host closed the connection)
21:55:03dom96I just wanted the debate to gain more people's opinions.
21:55:18dom96The fact that those people may be biased is something I did not consider.
21:57:49flaviuBut people's opinions are irrelevant here. The only question here is "Does this article fit within the rules?"
21:58:15*fizzbooze joined #nim
21:59:26*angus joined #nim
22:04:40*a5i joined #nim
22:04:47*ekarlso quit (Changing host)
22:04:47*ekarlso joined #nim
22:06:04fowlmouthAraq, my problem with untyped/typed: foo(x) x MUST have a type, compared to foo: echo x (the only way to pass a void is in a statement list) it seems that you have untyped/typed switched around
22:10:29*brson joined #nim
22:10:44*Jehan_ quit (Quit: Leaving)
22:14:25*Jehan_ joined #nim
22:20:13*quasinoxen quit (Ping timeout: 255 seconds)
22:20:38*quasinoxen joined #nim
22:22:08*askatasuna quit (Ping timeout: 264 seconds)
22:24:42*davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:33:43*mwbrown joined #nim
22:40:52*askatasuna joined #nim
22:44:04*mwbrown quit (Ping timeout: 250 seconds)
22:54:19*banister is now known as banisterfiend
22:54:48*askatasuna quit (Ping timeout: 256 seconds)
23:02:40*askatasuna joined #nim
23:04:04Araqfowlmouth: cannot follow you
23:04:27*yglukhov quit (Quit: Be back later ...)
23:07:18*jefus_ joined #nim
23:10:49*jefus quit (Ping timeout: 256 seconds)
23:12:34fowlmouthAraq, "s" would pass for untyped but echo(..) a command that returns void is called typed
23:17:13Araqfowlmouth: that's not how it works
23:17:25Araqtemplate foo(s: expr)
23:17:32Araqfoo: echo "x" # works
23:18:59fowlmouththen what is the diff between between expr and stmt
23:20:20*quasinoxen quit (Ping timeout: 264 seconds)
23:20:30*quasinoxen joined #nim
23:24:26*TEttinger joined #nim
23:24:26Araqstmt enforces type checking and symbol lookup
23:24:46Araqexpr doesn't
23:25:03Araqin other words expr gets nnkIdent, stmt gets nnkSym
23:25:09*vezzy joined #nim
23:25:18*quasinoxen quit (Ping timeout: 272 seconds)
23:26:15*gokr_ quit (Quit: IRC for Sailfish 0.9)
23:30:01*reem joined #nim
23:32:44*reem quit (Remote host closed the connection)
23:33:41*reem joined #nim
23:41:45*askatasuna quit (Ping timeout: 252 seconds)
23:50:13*askatasuna joined #nim
23:57:42*brson quit (Quit: leaving)