<< 01-07-2015 >>

00:00:25Jehan`It's essentially a portable assembly language, and a flawed one even for that purpose.
00:00:33*anthgur joined #nim
00:01:42AraqI disagree somewhat.
00:02:52AraqIt's often said that "C is a portable assembler" but in reality it just stopped evolving quite early. So you get structured control flow and a register allocator and not much more.
00:03:33Araqbut it never was designed as a "portable assembler" the first announcements mention it's a "high level language"
00:07:01Araqa portable assembler wouldn't have bit fields or structured control flow nor a pletora of operator precedence rules.
00:07:03ldleworkContext isn't static though
00:07:11ldleworkwrong channel actually
00:07:24Araqldlework: no it fits ;-)
00:09:40AraqJehan`: https://gist.github.com/Araq/8022f703001bf59e5ed2
00:10:13*vasher_ joined #nim
00:10:18Araqif I change it to pinToCpu(a[0], 0); pinToCpu(a[1], 0); the 0s and 1s don't flip as quickly
00:10:20Jehan`Araq: What about that?
00:10:37Araqand so I conclude pinToCpu works. :D
00:10:50Araqhighly scientific test
00:10:51Jehan`And I agree that it wasn't designed as a portable assembler, but it never lived up to being a high-level language.
00:11:02Jehan`Heh. :)
00:11:57Jehan`Try to check in `top` whether it's eating 100% or 200% CPU if you replace the echo with something CPU-bound.
00:12:32Araqyeah I thought of that but this machine is already too hot :-)
00:13:55Araqbut yeah that works
00:14:07Araq60% cpu vs 30%
00:22:40*zaquest is now known as zaquest_
00:22:50*zaquest_ is now known as zaquest
00:26:33*gokr quit (Quit: Leaving.)
00:29:12*vendethiel joined #nim
00:32:44Jehan`Where in posix.nim would I put popen() and pclose()? Or should they go in a separate module?
00:33:13Araqjust somewhere in posix.nim is fine
00:33:49Jehan`Okay.
00:33:51apensethis is going to make several people vomit: in re commits d46407c and 54a374a (which disabled vcc-specific code and allowed "#" directives in the header pragma), should I go ahead and rewrite the disabled code to have proc rand_s(val: var cuint) {.importc: "rand_s",
00:33:51apense header: "<stdlib.h> #define _CRT_RAND_S".}?
00:34:38Araqthe correct syntax is:
00:35:01Araqheader: "#define _CRT_RAND_S\n#include <stdlib.h>"
00:35:31Araqbut since other stuff might include stdlib already I don't think this works
00:36:03Araqthe generated code can end up as:
00:36:11Araq#include <stdlib.h>
00:36:17Araq#define _CRT_RAND_S
00:36:22Araq#include <stdlib.h>
00:36:42apensewould {.passC ....} work better? any option seems very ugly. I think you're right, as the "#define" needs to be *before* any "#include <stdlib.h>" anyway
00:37:09Araqwell we can fix the codegen so that includes starting with # come first
00:37:52Araqbut we can also just add the #define to nimbase.h
00:38:29apensedo you want me to make a PR with those changes? can I edit nimbase.h directly or is it generated?
00:38:31Jehan`Araq: It's just a bit ugly, because it depends on File. But it's POSIX functionality, so that's where it belongs.
00:39:47Araqapense: it's not generated, but why does this concern you so much? who cares if rand() is limited to 16 bits?
00:40:06AraqJehan`: yeah, it's fine in posix.nim
00:43:50*Jesin quit (Quit: Leaving)
00:44:51apenseAraq, it started concerning me mainly when I was working with cryptographic functions. it's not actually the size that bothers me so much (although it does a little). it's more that `rand` is not as secure as `rand_s`. Really, it's because it's not as secure as `rand_s`
00:45:15apenseI'll try to find a source if you're interested, but it seemed like a better idea to default to the more secure version
00:45:36apensefor what it's worth, i think it's actually only 15 bits (0 to 32767)
00:45:37Araqcan't we just use our own random number generator?
00:45:44apensewe can
00:45:49apensei think julia does that
00:45:56Araqso let's do that instead
00:46:22Araqactually
00:46:28apenseshould I open an issue on that?
00:46:38Araqjust .deprecate it, we'll move it from math into some other module
00:46:54Araqno, there is already an issue for that
00:47:08apensedeprecate all the random functions under windows?
00:47:22apenseor will we move all random ones elsewhere for all OSes?
00:48:29*Jehan` quit (Quit: Leaving)
00:49:56Araqthe latter
00:50:21*vendethiel quit (Ping timeout: 246 seconds)
01:14:42*vendethiel joined #nim
01:15:24*jaco60 quit (Ping timeout: 256 seconds)
01:22:52*yglukhov joined #nim
01:27:15*dddddd quit (Ping timeout: 264 seconds)
01:27:18*yglukhov quit (Ping timeout: 256 seconds)
01:38:27*Kingsquee quit (Read error: Connection reset by peer)
01:38:44*Kingsquee joined #nim
01:48:51*Demos joined #nim
01:50:41*pregressive joined #nim
01:53:02*Demos quit (Ping timeout: 246 seconds)
01:59:49*vendethiel quit (Ping timeout: 255 seconds)
02:07:30*vendethiel joined #nim
02:16:59*FedeOmoto quit (Ping timeout: 252 seconds)
02:28:22*vendethiel quit (Ping timeout: 276 seconds)
02:29:11*EXetoC quit (Ping timeout: 250 seconds)
02:33:57*gyeates quit (Ping timeout: 250 seconds)
02:48:53*Kingsquee quit (Ping timeout: 252 seconds)
02:49:23*Demos joined #nim
02:52:44*Jesin joined #nim
02:54:09*Demos quit (Ping timeout: 256 seconds)
03:02:03*brson joined #nim
03:07:36*gyeates joined #nim
03:12:08*gyeates quit (Ping timeout: 246 seconds)
03:28:35*darkf joined #nim
04:04:29*ozra quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
04:48:55*vasher_ quit (Quit: Connection closed for inactivity)
04:54:55*brson quit (Quit: leaving)
05:18:07*vendethiel joined #nim
05:24:00*vendethiel quit (Read error: Connection timed out)
05:24:10*vendethiel joined #nim
05:40:00*anthgur quit (Quit: My Mac has gone to sleep. ZZZzzz…)
05:56:55*Kingsquee joined #nim
06:09:45*vendethiel quit (Ping timeout: 250 seconds)
06:14:25*vendethiel joined #nim
06:20:20*Jesin quit (Quit: Leaving)
06:28:13*jubalh joined #nim
06:36:35*vendethiel quit (Ping timeout: 252 seconds)
06:38:01*vendethiel joined #nim
06:39:21*gyeates joined #nim
06:50:10*gyeates quit (Ping timeout: 272 seconds)
06:56:15*Ven joined #nim
06:57:34*dtscode quit (Quit: ZNC - 1.6.0 - http://znc.in)
06:57:50*dtscode joined #nim
07:00:30*vendethiel quit (Ping timeout: 256 seconds)
07:06:07*Trustable joined #nim
07:08:26*johnsoft quit (Ping timeout: 256 seconds)
07:08:47*johnsoft joined #nim
07:08:54*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:12:24*wan quit (Ping timeout: 256 seconds)
07:16:33*vendethiel joined #nim
07:17:24*Ven joined #nim
07:25:00*jszymanski joined #nim
07:25:34*wan joined #nim
07:26:56*xificurC quit (Ping timeout: 244 seconds)
07:28:15*jszymanski quit (Client Quit)
07:30:42*xificurC joined #nim
07:37:45*vendethiel quit (Ping timeout: 246 seconds)
07:43:15*jszymanski joined #nim
07:49:57*xificurC quit (Ping timeout: 256 seconds)
07:57:00*OnO joined #nim
08:10:46*yglukhov joined #nim
08:30:47*jaco60 joined #nim
08:34:12*milosn quit (Quit: leaving)
08:36:03*yglukhov_ joined #nim
08:37:40*MatrixBridge2401 quit (Read error: Connection reset by peer)
08:37:40*MatrixBridge quit (Remote host closed the connection)
08:38:03*MatrixBridge joined #nim
08:38:45*yglukhov quit (Ping timeout: 244 seconds)
08:40:47*yglukhov_ quit (Remote host closed the connection)
08:41:21*yglukhov_ joined #nim
08:49:49*JehanII joined #nim
09:04:04*JehanII is now known as Jehan`
09:14:59*scoeri quit (Ping timeout: 252 seconds)
09:26:17*vasher_ joined #nim
09:30:54*Demon_Fox joined #nim
09:41:28*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:46:49*Demon_Fox quit (Quit: Leaving)
09:47:18*Demon_Fox joined #nim
09:48:38*Demon_Fox quit (Client Quit)
09:49:02*Demon_Fox joined #nim
09:54:38*Kingsquee quit (Quit: Konversation terminated!)
10:02:57*xificurC joined #nim
10:05:19*yglukhov_ quit (Ping timeout: 276 seconds)
10:05:53*yglukhov_ joined #nim
10:11:12*jaco60 quit (Remote host closed the connection)
10:14:06*jaco60 joined #nim
10:22:37*yglukhov_ quit (Quit: Lingo: www.lingoirc.com)
10:24:58*Demon_Fox quit (Quit: Leaving)
10:32:40*gokr joined #nim
10:44:10*lesshaste joined #nim
10:44:11lesshastehi all
10:44:31*johnsoft quit (Ping timeout: 255 seconds)
10:45:12*johnsoft joined #nim
10:53:03*Ven joined #nim
10:54:55*dddddd joined #nim
10:56:05*Ven_ joined #nim
10:56:06*yglukhov joined #nim
10:57:53def-hi lesshaste
10:58:23*Ven quit (Ping timeout: 248 seconds)
10:58:34*yglukhov_ joined #nim
10:59:46*Ven_ quit (Read error: No route to host)
11:02:42*yglukhov quit (Ping timeout: 265 seconds)
11:04:02*EXetoC joined #nim
11:07:33*gmpreussner|work quit (Read error: Connection reset by peer)
11:08:21*gmpreussner|work joined #nim
11:19:52*arnetheduck joined #nim
11:19:57*Ven joined #nim
11:31:27*dalarmmst quit (Ping timeout: 248 seconds)
11:38:48*vasher_ quit (Quit: Connection closed for inactivity)
11:44:42*dalarmmst joined #nim
11:45:07*xcombelle joined #nim
11:47:06r-kuwasnt there a pragma which would add c/cpp file to compilation?
11:49:27def-r-ku: {.compile: "foo.c".}
11:49:51r-kuthanks
11:55:59*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:20:43*thaless joined #nim
12:43:46*BitPuffin|osx joined #nim
12:47:03*yglukhov_ quit (Quit: Be back later ...)
12:52:12*yglukhov_ joined #nim
13:00:40*woadwarrior joined #nim
13:02:29*Demon_Fox joined #nim
13:06:44*Jehan` quit (Quit: Leaving)
13:14:32*pregressive quit (Read error: Connection reset by peer)
13:15:27*ozra joined #nim
13:19:12*doxavore joined #nim
13:24:59*wuehlmaus quit (Quit: Lost terminal)
13:26:26*yglukhov_ quit (Quit: Be back later ...)
13:26:56*Demos joined #nim
13:27:14*doxavore quit (Quit: I said good day, sir.)
13:34:40*doxavore joined #nim
13:40:35*milosn joined #nim
13:45:32Araqdef-: I'm pushing a fix for https://github.com/nim-lang/Nim/issues/2429 can you ensure the XML wikipedia test still works?
13:45:46*boopsiesisaway is now known as boopsies
13:46:22def-Araq: ok
13:47:36*EXetoC quit (Quit: WeeChat 1.2)
13:48:44*anthgur joined #nim
13:55:19*woadwarrior quit (Quit: Textual IRC Client: www.textualapp.com)
14:02:21*anthgur quit (Remote host closed the connection)
14:05:32*pregressive joined #nim
14:07:19*pregressive quit (Read error: Connection reset by peer)
14:07:38*pregressive joined #nim
14:35:07*wuehlmaus joined #nim
14:36:16*dalarmmst quit (Ping timeout: 255 seconds)
14:36:22*Jehan` joined #nim
14:37:16Jehan`Araq: I'm currently trying to make cross-compiling work for Cygwin. Do you want a patch when I'm done?
14:37:31*themagician_d joined #nim
14:37:44*Pisuke joined #nim
14:39:07Jehan`Right now it's just so that the compiler compiles cleanly and that basic libraries work. I'm not yet planning on dealing with all the OS-specific stuff.
14:39:29Araqupdated platform.nim ?
14:40:10*cyraxjoe_ joined #nim
14:41:14Jehan`Araq: Yeah, osCygwin and all that.
14:41:18*AckZ_ joined #nim
14:41:29*tmku_ joined #nim
14:41:32Jehan`Also condsyms.nim
14:41:36*dv-_ joined #nim
14:41:47def-Araq: we have a testcase for that? I just ran the wiki2text program with a big dump. the output looks fine and runs fast
14:41:52*wuehlmau1 joined #nim
14:41:57*milosn_ joined #nim
14:42:10Jehan`The basic version works, but I'm trying to see what it breaks.
14:42:24Araqdef-: we did run a couple of tests too, but the test suite is still lacking for these old libs
14:42:29Jehan`The problem is that Cygwin is an OS emulator that tries to be windows and posix at the same time.
14:42:52*Rush joined #nim
14:43:02Jehan`I have the compiler and some basic tests working, but really need to go beyond that.
14:43:07AraqI still wonder how they emulate fork()
14:43:21Jehan`Poorly. :)
14:43:29Jehan`It's one of the major pain points.
14:44:13Araqthe Mill guys filled yet another patent when they figured out how fork could work on their new architecture
14:44:27*FedeOmoto joined #nim
14:45:21*r-ku- joined #nim
14:45:44Jehan`There's a lot of actual copying involved.
14:46:35*wuehlmaus quit (*.net *.split)
14:46:35*milosn quit (*.net *.split)
14:46:35*wan quit (*.net *.split)
14:46:35*MyMind quit (*.net *.split)
14:46:35*themagician quit (*.net *.split)
14:46:35*thotypous quit (*.net *.split)
14:46:36*strcmp1 quit (*.net *.split)
14:46:36*ChrisMAN quit (*.net *.split)
14:46:36*r-ku quit (*.net *.split)
14:46:36*tmku quit (*.net *.split)
14:46:36*polde quit (*.net *.split)
14:46:36*cyraxjoe quit (*.net *.split)
14:46:37*pmbauer quit (*.net *.split)
14:46:37*mtj_ quit (*.net *.split)
14:46:37*DecoPerson quit (*.net *.split)
14:46:37*TylerE quit (*.net *.split)
14:46:37*AckZ quit (*.net *.split)
14:46:38*joebo quit (*.net *.split)
14:46:38*cazov quit (*.net *.split)
14:46:39*RushPL quit (*.net *.split)
14:46:39*dv- quit (*.net *.split)
14:46:39*tstm quit (*.net *.split)
14:46:53*r-ku- is now known as r-ku
14:47:15*cazov joined #nim
14:48:01*yglukhov_ joined #nim
14:49:19*AckZ_ is now known as AckZ
14:50:29Demosfork being fast is pretty critical to being unix tho
14:52:46*wan joined #nim
14:52:47*Demos quit (Remote host closed the connection)
14:53:01*joebo joined #nim
14:53:03*strcmp1 joined #nim
14:53:12*thotypous joined #nim
14:53:17*mtj_ joined #nim
14:53:40*tstm joined #nim
14:53:42*ChrisMAN joined #nim
14:54:21*polde joined #nim
14:55:01*Demos joined #nim
14:58:04*pmbauer joined #nim
14:58:49*TylerE joined #nim
14:58:59*jubalh quit (Quit: Leaving)
15:00:20*boopsies is now known as boopsiesisaway
15:02:06*boopsiesisaway is now known as boopsies
15:02:47*Demos quit (Remote host closed the connection)
15:03:24*DecoPerson joined #nim
15:05:10OnOAraq: for some reason you change strictSymEquality=true for opcEqNimrodNode broke comparing bindSym to getType sym
15:05:29OnOmacro testComp(sym: typedesc[Obj]): expr = newLit(sym.getType[1] == bindSym"Obj") -> testComp(Obj) returns false
15:06:15*Demos_ joined #nim
15:07:31*vendethiel joined #nim
15:07:38Araqwant to fix it?
15:08:29*Demos_ quit (Remote host closed the connection)
15:12:03*Demos joined #nim
15:12:17OnOI dunno, but is comparing nkSym nodewise will always fail?
15:13:08Araqwell the old way was clearly wrong
15:13:16Araqnow it fails for some other reason
15:13:24Araqnot hard to debug
15:13:27Araqoutput the IDs
15:13:31Araqedit ast.nim
15:13:36Araqproc newSym
15:13:51Araq if result.id == victim: writeStackTrace()
15:14:13OnOoook
15:14:16OnOgood hint
15:14:17OnOwill do
15:15:06Araqthe IDs are really sweet for debugging. too bad nobody uses them ;-)
15:19:38*rgv151 quit (Read error: Connection reset by peer)
15:22:38OnOeven sym.getType[1] == sym.getType[1] return false
15:23:14*dalarmmst joined #nim
15:24:05OnOit creates new sym node on rawExecute->opMapTypeToAst->mapTypeToAst->mapTypeToAst->atomicTypeX->newSym
15:24:48OnOopMapTypeToAst is called in opcNGetType
15:25:49OnOso far it is really cryptic
15:30:23Araqvmdeps.atomicTypeX returns a new sym so that people cannot mess with the compiler's internal types
15:30:30*vendethiel quit (Ping timeout: 256 seconds)
15:30:47Araqbut I guess it needs to use t.sym instead if available
15:31:47*thaless quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
15:32:28Araqalso atomicType("char") etc cannot work this way then
15:32:45*thaless joined #nim
15:33:45Araqthe types API was designed for introspection, not type equality testing
15:33:53*Demos quit (Remote host closed the connection)
15:35:14*Demos joined #nim
15:38:04*Demos quit (Remote host closed the connection)
15:39:32*Demos joined #nim
15:41:12OnOcan we somehow bind the original type to this new atomic type and use that for introspection... or maybe we can lock some nimNodes such as types from being modified in macros?
15:45:03Araqmagicsys.getSysSym("bool") is a start
15:45:19*Demos quit (Remote host closed the connection)
15:47:03*Demos joined #nim
15:47:05*arnetheduck quit (Ping timeout: 256 seconds)
15:49:32*gyeates joined #nim
15:50:11*Demos quit (Remote host closed the connection)
15:50:20OnOok, but what approach is better?
15:50:49OnOreturning original symbols, but preventing modification on symbols created outside of a macro?
15:51:20*Demos joined #nim
15:51:45*milosn_ is now known as milosn
15:54:01*cyraxjoe_ is now known as cyraxjoe
15:56:18*Demos quit (Remote host closed the connection)
15:57:27*darkf quit (Quit: Leaving)
16:01:19Araqwell I dunno yet. equality for types is hard
16:01:37Araqand that we map types to NimNodes doesn't help
16:04:48Jehan`Incidentally, is there a way to construct a type's AST (for purposes of code generation) from the (different) AST you get via getType()?
16:05:16Araqyeah and fowl has some code to help with that
16:07:28*yglukhov_ quit (Ping timeout: 264 seconds)
16:10:13*Ven joined #nim
16:10:28OnOhow would that help with comparing types?
16:17:22Jehan`It wouldn't, it's just something I'm interested in for unrelated reasons.
16:19:57*Ven quit (Ping timeout: 246 seconds)
16:28:32*lesshaste quit (Quit: Leaving)
16:32:02*Ven joined #nim
16:35:43*judofyr joined #nim
16:37:51*elbow_jason joined #nim
16:39:23*milosn quit (Ping timeout: 250 seconds)
16:41:52*dv-_ quit (Changing host)
16:41:52*dv-_ joined #nim
16:42:21*dv-_ is now known as dv-
16:43:26*milosn joined #nim
16:56:50OnOcan there be 2 symbols with same name and same owner?
16:57:33OnOis owner for TSym is in fact a scope of the symbol?
17:05:13*gyeates quit (Ping timeout: 276 seconds)
17:05:56*vendethiel joined #nim
17:09:18*doxavore quit (Quit: I said good day, sir.)
17:09:28*solidsnack joined #nim
17:11:40*pregressive quit (Remote host closed the connection)
17:17:58*gyeates joined #nim
17:26:31*xificurC quit (Quit: WeeChat 1.2)
17:27:07*xificurC joined #nim
17:32:18*pregressive joined #nim
17:33:14*thaless quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
17:37:30*solidsnack quit (Quit: My Mac has gone to sleep. ZZZzzz…)
17:43:21AraqOnO: surely that is allowed. overloading.
17:44:17OnOyes, that was a stupid question
17:44:40OnObut it TSym represents a type then sym.typ.sym == sym ?
17:45:32AraqI don't think so. type Alias = int
17:45:57Araqnot sure what the current implementation does for that though
17:46:57*gmpreussner|work quit (Read error: Connection reset by peer)
17:46:58*gmpreussner|work joined #nim
17:47:05*heinrich5991 quit (Excess Flood)
17:47:07*renatolm joined #nim
17:47:22*heinrich5991 joined #nim
17:47:53*renatolm left #nim (#nim)
17:47:57OnOok then, maybe for TSym made of atomic type we should just compare .typ ?
17:47:58*Demon_Fox quit (Ping timeout: 244 seconds)
17:48:50*Demon_Fox joined #nim
17:48:53*doxavore joined #nim
17:48:58AraqAST comparison should compare symbols, not types
17:49:39Araqmaybe you want a new builtin macros.sameType(a,b) instead of basing this all on the == for NimNode
17:50:47Araqeventually we need compareType(a, b): enum Subtype, Equal, Convertible, Unequal
17:54:17*milosn quit (Remote host closed the connection)
17:56:01*milosn joined #nim
17:56:13*Demos joined #nim
17:56:22OnOokay, you are right, we need sameType macro
17:56:49*BitPuffin|osx quit (Ping timeout: 264 seconds)
17:57:36*solidsnack joined #nim
17:58:22*solidsnack quit (Max SendQ exceeded)
18:00:59*Demos quit (Remote host closed the connection)
18:03:51*Demos joined #nim
18:03:54*Ven quit (Ping timeout: 252 seconds)
18:06:35*FedeOmoto quit (Ping timeout: 265 seconds)
18:16:39*FedeOmoto joined #nim
18:17:07OnOhttps://github.com/nim-lang/Nim/pull/3036
18:25:37*jszymanski quit (Ping timeout: 264 seconds)
18:26:01*tmku_ is now known as tmku
18:26:20*jszymanski joined #nim
18:28:46*elbow_jason quit (Quit: Leaving)
18:41:32*nande joined #nim
18:46:35*Matthias247 joined #nim
18:59:05*wuehlmau1 is now known as wuehlmaus
19:03:16*xcombelle quit (Remote host closed the connection)
19:05:49*judofyr quit (Remote host closed the connection)
19:06:22*rgv151 joined #nim
19:07:37*jszymanski quit (Ping timeout: 264 seconds)
19:08:38rgv151hi dom96, i wonder why this proc is not exported https://github.com/nim-lang/Nim/blob/devel/lib/pure/httpclient.nim#L362
19:09:11*jszymanski joined #nim
19:13:57*BitPuffin|osx joined #nim
19:21:58*pregressive quit (Remote host closed the connection)
19:25:01*[CBR]Unspoken1 quit (Ping timeout: 264 seconds)
19:27:30*jubalh joined #nim
19:36:36*pregressive joined #nim
19:37:20dom96rgv151: I didn't write that code specifically
19:37:24dom96What do you need that proc for?
19:38:37rgv151i want to make an async post request with mutilpart data
19:40:16dom96We need to implement an async `post` then.
19:40:58rgv151yup, i think so
19:50:36*jubalh quit (Ping timeout: 252 seconds)
19:56:26rgv151I implemented it, going to make a PR now
19:57:40dom96awesome thanks!
19:58:26rgv151you are welcome
20:09:06rgv151PR'ed
20:11:23dom96merged :)
20:11:33rgv151thank you
20:16:28dtscodeIs it better to make feature requests in here or on github?
20:16:47DemosProbably make them on the forum
20:16:48Demosidk
20:21:36Araqdtscode: most people (mis)use the bug tracker for that
20:21:59dtscodeAraq: So I should do it there?
20:22:21Araqno tell me now, you made me curious
20:24:09dtscodeIts not a major one. I was just wondering if it was possible to add default: as an alias for else: specifically for cases
20:24:30dtscodecause as a c/++ programmer I keep writing default and wondering why errors about not covering every case pop up
20:25:38*EXetoC joined #nim
20:25:40EXetoC:o
20:25:41fowlDamnit dts
20:25:48fowlYou're just like everybody else
20:25:51Araqhrm, tough one, cannot see that working out
20:26:14Araqwould require yet another keyword for an issue that goes away when you write more nim code
20:26:37fowl"Hey i just came from X language, can we add features from X to nim to make it easier for me to write nim"
20:26:53AraqEXetoC: hahaha, people use your mongo wrapper. don't hide
20:27:15EXetoCjust clone java, but change the name
20:27:44*rgv151 quit (Ping timeout: 246 seconds)
20:27:49EXetoCAraq: I just never have any motivation
20:27:56gokrdtscode: Come on... ;)
20:28:10AraqEXetoC: but now you do :-)
20:28:29dtscodebut see, most languages use default over else
20:28:54gokrBut who wants to program in "most languages"? :)
20:29:08dtscodeeh fair enough
20:29:49federico3stupid question: can "default" be implemented using a template or a macro based on "else"?
20:30:22gokrBut generally - an alias? I would actually supporting a change more than "adding an alias". Aliases for these things are IMHO just hurtful.
20:30:30fowlNo because a bare else is not valid syntax
20:30:46gokrAnd ... why do we want to make our own little dialects like this?
20:30:55dtscodesays the guy writing ni
20:31:04gokrThat's not a Nim dialect.
20:31:07AraqNim got its syntax from Delphi and Python. Or perhaps Modula 3 and python. python got its from Modula 3 too so ... it's more consistent than most people realize. or maybe I'm nuts.
20:31:08EXetoCmake it awesome, and don't compromise
20:31:10gokrThats a different language.
20:31:16EXetoCthat's my philosophy :p
20:31:36gokrdtscode: And generally, ni is a stupid name btw.
20:31:46dtscodeof course "D
20:31:55Araqfederico3: you can have a 'match' macro that uses 'default'
20:32:08gokrBut my point being, everyone is used to different little things.
20:32:31gokrSo you can't win that game so to speaj.
20:32:33gokrspeak.
20:33:09gokrWhat one can do however is improve compilation errors etc to try to help people understand what the heck they just did wrong.
20:33:37gokrI have a few things i keep doing wrong too. And some of them annoyingly takes a bit of time to discover, every time.
20:37:10Araqactually in my original design the #! syntax was a core feature allowing mutliple syntaxes to co-exist peacefully so that everybody can use his prefered syntax. The whole "comments are part of the AST" idea comes from that. But meh since it requires extensive editor support anyway, it can just live entirely in the editor.
20:37:32pigmejreactormonk: pign
20:37:33pigmejping
20:37:43EXetoCAraq: not really
20:38:22EXetoCif only I could make all problems go away so that I could just focus on them libs for a while. oh well
20:39:27reactormonkpigmej, IRC is async you know, just write and I'll answer in due time
20:40:01pigmejreactormonk: yeah yeah sure, but I will be off in next hour or so and then I would need to read backlog ;P
20:40:02Araqgokr: make a list of these things please
20:40:11pigmejreactormonk: how we want to test thing-at-point for example?
20:40:13gokryeah, I should
20:40:21pigmejI checked the tests directory and... no clue at all
20:40:37reactormonkpigmej, err.
20:41:18gokrAraq: Does the comments exist in the AST? So ... macros can take Nim comments and generate say... Smalltalk comments? (thinking of SqueakNim)
20:41:28*vendethiel- joined #nim
20:41:52reactormonkpigmej, I guess just test nim-thing-at-point--format-minibuffer - close enough, if at all
20:42:12reactormonkpigmej, I actually think it's not worth testing here.
20:42:28pigmejyeah that's why I asked, because... bad tests are worse than nothing,
20:42:38reactormonkBetter spend your time testing nimsuggest if you feel like it
20:42:45Araqgokr: doc comments, yes.
20:42:49EXetoCwhy couldn't comment remain in the AST while having some rules be changed?
20:42:55EXetoCok
20:42:58EXetoCfair enough
20:43:07gokrAraq: nice
20:43:22pigmejreactormonk: yeah, and we have to improve docs ;)
20:43:35*vendethiel quit (Ping timeout: 252 seconds)
20:47:07*EXetoC left #nim ("WeeChat 1.2")
20:54:26*Jesin joined #nim
21:05:07*Kingsquee joined #nim
21:10:41FedeOmotocan someone please tell me what I'm doing wrong?:
21:10:49FedeOmototype
21:10:49FedeOmoto Data[T] = ref object of RootObj
21:10:49FedeOmoto data: T
21:10:49FedeOmoto Type = ref object of RootObj
21:10:49FedeOmoto SubType[T] = ref object of Type
21:10:50FedeOmoto data: Data[T]
21:10:54FedeOmoto SubSubType = ref object of SubType
21:10:56FedeOmoto SubSubSubType = ref object of SubSubType
21:11:06FedeOmotowhen I compile that code snippet I get a SIGSEGV
21:11:44FedeOmotothe last line produces the SIGSEGV, if it's removed, it compiles ok
21:11:45Xewhat platform?
21:11:58FedeOmotolinux x86_64
21:12:14Xei'm seeing that too
21:12:21Xemight be worthwhile to open a github issue
21:12:25Xenim 0.11.2
21:12:36FedeOmoto0.11.2 here too
21:13:23Araqfixed on devel :P
21:13:32Araqwell just kidding. I don't know
21:13:54ozraFedeOmoto: Does it work if you explicitly add [T] in the inheritance?
21:15:38ozraSubSubType[T] = ref object of SubType[T] ...
21:15:41Xeozra: added [T] in the inheritance chain
21:15:46Xeit still segfaults
21:15:50ozraOk
21:16:39Xehttps://github.com/nim-lang/Nim/issues/3038
21:19:42*strcmp1 quit (Ping timeout: 252 seconds)
21:21:58*strcmp1 joined #nim
21:23:40FedeOmotoozra: what Xe said :P
21:24:00XeFedeOmoto: can you confirm on the github ticket that you are also affected?
21:25:41FedeOmotoXe: done, and thx for opening the issue!
21:30:30Araqozra: want to work on lamdalifting (LL) instead?
21:30:39*Matthias247 quit (Read error: Connection reset by peer)
21:30:47AraqI heard it's way harder than generic inheritance
21:40:14*pregressive quit (Ping timeout: 252 seconds)
21:45:25*nodejs joined #nim
21:46:21nodejsis there something missing in this code? it won't compile:
21:46:23nodejsproc ctof*(cel: float): float = result = (9/5) * cel + 32
21:47:12Demoswhat's the error?
21:47:45nodejsexpected int int
21:48:24nodejsshould it compile correctly?
21:48:57*jszymanski quit (Quit: computer sleeps...)
21:51:11FedeOmotonodejs: It compiles fine with 0.11.2 on Linux 64bit
21:52:21nodejsmust be a problem with my computer/compiler
21:52:23FedeOmotoBTW, you can just write: proc ctof*(cel: float): float = (9/5) * cel + 32
21:52:30nodejsthanks!
21:52:34FedeOmotonp
21:52:55nodejsdoes it also work when you call it?
21:53:01FedeOmotoyep
21:53:17nodejsgreat
21:54:25FedeOmoto[fomoto@terminus compiler]$ cat d.nim
21:54:25FedeOmotoproc ctof*(cel: float): float = (9/5) * cel + 32
21:54:25FedeOmotoecho ctof(1.4)
21:54:25FedeOmoto[fomoto@terminus compiler]$ nim --verbosity: 0 -r c d
21:54:25FedeOmoto34.52
21:55:29nodejshrm
21:59:54*FedeOmoto quit (Quit: Leaving)
22:00:55*nodejs quit (Quit: Page closed)
22:03:31*doxavore quit (Quit: I said good day, sir.)
22:07:14*pregressive joined #nim
22:10:24*Varriount|Mobile joined #nim
22:11:33*pipeep quit (Ping timeout: 256 seconds)
22:11:49*pregressive quit (Ping timeout: 264 seconds)
22:12:18*pipeep joined #nim
22:20:56*strcmp2 joined #nim
22:23:05*strcmp1 quit (Ping timeout: 264 seconds)
22:26:37*vasher_ joined #nim
22:32:06*elbow_jason joined #nim
22:35:32ozraAraq: More complicated? Would be delighted! Not ;-)
22:39:10Varriount|MobileAraq: Hey, should it be possible to use 'addr' as a procedure name?
22:39:36Varriount|Mobileozra: Thanks for all the help with the highlighting for NimLime
22:41:39*Guest80548 joined #nim
22:42:44ozraVarriount: np!
22:43:58Varriount|MobileAraq: Whether it's intended or not, I've written up a seq-based wide string type which overloads addr() to mimic current WideString behavior.
22:46:15fowlYou can overload addr?
22:48:31*Trustable quit (Remote host closed the connection)
22:49:37*Demos quit (Remote host closed the connection)
22:49:59*Demos joined #nim
22:51:58*Demos quit (Remote host closed the connection)
22:53:53*xdc left #nim (#nim)
23:11:30*elbow_jason quit (Quit: Leaving)
23:20:31*Varriount|Mobile quit (Ping timeout: 246 seconds)
23:47:30*boopsies is now known as boopsiesisaway