<< 12-12-2014 >>

00:00:17*cir0x quit (Quit: WeeChat 1.0.1)
00:00:36repaxgokr, the source has to be parsed one time or another. I'd say: parse it once and then update the AST as the programmer modifies the code instead of reparsing it again over and over
00:00:43gokrThe refactoring tool built its own AST earlier though (in Squeak/Pharo) - probably to not lose stuff doing transformations.
00:02:17gokrYes, I understand the idea, but as Araq points out - there are issues. And ... as someone coming from a world that doesn't play well with editors - you are going to piss off every Emacser/Vimer out there.
00:02:45*Var|Mobile quit (Ping timeout: 252 seconds)
00:03:05gokrI love the Smalltalk environment. But so, so many haven't bothered to look closer just because it doesn't use "source code in files".
00:03:13repaxThey all live in the past
00:03:19gokrI know :)
00:03:34Araqgokr: fyi only doc comments (##) are now part of the AST
00:03:36gokrAs Kent Beck said "Source code in files, how quaint." :) I think it was him.
00:03:41Araqrepax: +1
00:04:21dts|pokeballhmmm i think ill have to use mongo instead of sqlite
00:04:34EXetoCwell I don't know of any editor that... edits, as well
00:05:01flaviuAren't there new efforts to make vim a library?
00:05:02repaxThe problem with editors is that they don't know "what" they edit
00:05:09*Matthias247 quit (Read error: Connection reset by peer)
00:05:33gokrThe interesting thing is that a Smalltalk env can be considered to be one gigantic super editor with builtin execution and debugger and the works. Just like Emacs, but *language aware*.
00:05:38Araqrepax: yeah but to be fair, graphical programming has been tried again and again and doesn't scale
00:06:05repaxAraq, you may use a keyboard :)
00:06:13gokrI don't think repax thought of graphical programming.
00:06:14EXetoCrepax: the plugins do
00:06:38repaxEXetoC, wrong level of abstraction
00:06:58Araqwell once you go beyond AST based editing, graphical programming awaits
00:07:16Araqpeople tried text based and graphical and text based won
00:07:47repaxI'm not advocating graphical programming
00:07:49AraqAST based as the real solution wasn't tried as much
00:07:54gokrI wonder if a statically typed language like Nim can be made into an "interactive world" like Smalltalk. It must have been done, right?
00:08:03flaviuAraq: Lisp and paranedit?
00:08:07gokrI mean, Lisp and Smalltalk can't be the only ones.
00:08:37EXetoCrepax: what's missing when you've rendered an AST?
00:08:55flaviugokr: well, the JSON library is sort of like interaction between a statically typed world and dynamically typed world
00:09:23Araqrepax: I know, but I think people tried 2 extremes and the solution in between got lost
00:10:02gokrThe issues I am thinking of is... "unit of compilation", being able to still run even if the code is in a semi "incorrect" state. Data migration. etc.
00:11:04Araqiirc the best environment is Mathematica
00:11:24repaxEXetoC, correct me if I'm wrong but, the plugin has to reparse the TEXT to update its internal AST
00:11:27Araqyou type in text, it's rendered as proper Math, aka 2d layout
00:12:04repaxAraq, yeah that's exactly right
00:12:20*BlaXpirit quit (Quit: Quit Konversation)
00:12:27gokrflaviu: Not sure if you know Smalltalk, but I presume you know the "Lisp machines" etc, basically you are "always in runtime" and the IDE and your code is all in the same space.
00:12:38Araqand it's done on the fly, not that TeX batch processing bullshit
00:12:59Araqthat I'm sure produced so many wrong results in science it's not even funny
00:13:26Araqthe feedback loop is non-existent with TeX
00:13:45repaxMinimise the feedback loop
00:13:50gokrUnless you use LyX or something I guess.
00:13:56gokrrepax: Smalltalk! :)
00:13:57Araqyup.
00:13:58repaxMake feedback immediate if possible
00:14:07fowlAraq, found a syntax regression
00:14:42Araqfowl: report it, but I changed => parsing as announced
00:14:51fowldoesnt compile anymore https://gist.github.com/fowlmouth/aaadc3f827c6be77028a
00:15:28Araqhrm ... strange
00:15:29gokrgnite folks
00:15:35repaxbibi
00:16:13fowlit doesnt work if i combine it to one line
00:16:24fowlError: ')' expected
00:16:47Araqah lol
00:16:56Araq'func' is a keyword now
00:17:07Araqreplace it with 'fun'
00:17:12fowloh ok
00:19:38repaxgreat! I believe func as a keyword will cause people to go for functional style more easily (path of least resistance, and so on...)
00:21:05repaxwith all due deference to pragmas, of course
00:21:37Araqfowl: I like your feedback for the 'func' that I have in mind:
00:22:01Araqhttp://forum.nim-lang.org/t/657
00:23:33*EXetoC quit (Quit: WeeChat 1.0.1)
00:25:34fowli dont see that as necessary at all
00:25:51Araqdamn
00:26:01AraqI thought you would love it
00:26:06VarriountI have to agree with fowl
00:26:09fowl{.pragma: func, noSideEffect, ...} works just as well
00:26:32Araqwell no, because it's slightly more verbose
00:26:50fowli'm still waiting for "type Foo{.macro.} = object"
00:27:12fowli promise i wont shoot anybody else in the foot with it
00:27:27fowlmy feet are already done for
00:28:30Araqok
00:28:35Araqis that the same as:
00:28:42Araqmacro: type Foo = object
00:28:44Araq?
00:29:16repaxI think programmers are creatures who aimlessly follow the path of least resistance. Sometimes a nudge or so it needed
00:29:46fowlAraq, i like how it works with procs, the proc def is passed in as the macros first argument (so, not a stmtlist)
00:32:22Araqfowl: does that mean 'yes'?
00:33:01*repax quit (Quit: repax)
00:39:26Araqgood night
00:39:57fowlgood night
00:47:24*EXetoC joined #nimrod
00:52:39*nande quit (Remote host closed the connection)
01:04:02*Var|Mobile joined #nimrod
01:06:31*drewsrem joined #nimrod
01:07:02*yglukhov___ joined #nimrod
01:11:51*yglukhov___ quit (Ping timeout: 272 seconds)
01:22:09*brson quit (Quit: leaving)
01:22:42*brson joined #nimrod
01:28:11*xtagon quit (Read error: Connection timed out)
01:28:41*xtagon joined #nimrod
01:30:39*brson quit (Quit: leaving)
01:30:52*brson joined #nimrod
01:51:09*saml_ joined #nimrod
02:21:32*perturbation quit (Quit: Leaving)
02:22:30*darkf joined #nimrod
02:29:57*dain joined #nimrod
02:31:43*drewsrem quit (Quit: Leaving)
02:36:33*q66 quit (Quit: Leaving)
02:36:35*brson quit (Quit: leaving)
02:39:39*kapil__ joined #nimrod
02:55:59*yglukhov___ joined #nimrod
03:00:35*yglukhov___ quit (Ping timeout: 250 seconds)
03:04:57*Var|Mobile quit (Ping timeout: 240 seconds)
03:09:12*pwernersbach joined #nimrod
03:09:15*starless quit (Quit: WeeChat 0.4.2)
03:10:37pwernersbachHey Araq
03:10:48Araqhi
03:11:11pwernersbachWhat regression are you referring to here —> http://forum.nim-lang.org/t/656
03:14:31Araq#1701
03:19:33*yglukhov___ joined #nimrod
03:22:22*nande joined #nimrod
03:23:22pwernersbachI don't know who maintains the website, but nim-lang.org's IRC link points to #nimlang, while forum.nim-lang.org points to #nim, and we are still here in #nimrod
03:23:59*yglukhov___ quit (Ping timeout: 245 seconds)
03:24:14Araqyeah I know
03:24:37Araqwe want to rename the #nimrod channel to #nim but dom96 is busy with ... eating pizza
03:24:57pwernersbachAlso, *.nimrod-lang.org/* should redirect to nim-lang.org with a "301 Moved Permanently"
03:25:45pwernersbachHaha, he can eat pizza. Nim will still be here when he gets back
03:30:29Araqgood night
03:31:49pwernersbachSee you
04:01:32*johnsoft quit (Ping timeout: 245 seconds)
04:02:36*johnsoft joined #nimrod
04:02:40*johnsoft quit (Read error: Connection reset by peer)
04:19:26*johnsoft joined #nimrod
04:32:39*endou_____ quit (Ping timeout: 244 seconds)
04:33:10*Trixar_za quit (Ping timeout: 244 seconds)
04:33:28*endou_____ joined #nimrod
04:33:46*Trixar_za joined #nimrod
04:39:16*superfunc_ quit (Ping timeout: 246 seconds)
04:45:29*pwernersbach left #nimrod (#nimrod)
04:47:21*ARCADIVS joined #nimrod
04:47:24*saml_ quit (Quit: Leaving)
05:01:27*kapil__ quit (Quit: Connection closed for inactivity)
05:06:56*flaviu quit (Ping timeout: 264 seconds)
05:21:51*willwillson quit (Ping timeout: 250 seconds)
05:33:34*kapil__ joined #nimrod
05:45:32*khmm joined #nimrod
05:48:54*dain quit (Quit: dain)
05:49:48*Jesin quit (Quit: Leaving)
05:51:12*BlaXpirit joined #nimrod
06:04:25*nande quit (Read error: Connection reset by peer)
06:28:59VarriountGah, why must flexibility always come at the cost of efficiency or space.
06:31:29*khmm quit (Ping timeout: 245 seconds)
06:33:27*dyu joined #nimrod
06:36:33*khmm joined #nimrod
06:40:10*bjz joined #nimrod
06:50:11*xtagon quit (Quit: Leaving)
07:03:48*gour joined #nimrod
07:04:48*kniteli quit (Ping timeout: 258 seconds)
07:05:59*AMorpork is now known as ZzZMorpork
07:07:47*johnsoft quit (Ping timeout: 272 seconds)
07:09:01*johnsoft joined #nimrod
07:11:17*gokr_ quit (Ping timeout: 240 seconds)
07:18:54*gokr_ joined #nimrod
07:23:27*gour quit (Quit: Konversation terminated!)
07:23:30dts|pokeballhey i found a mistake in the site
07:24:14*gour joined #nimrod
07:37:01*gokr_ quit (Read error: Connection reset by peer)
07:37:23*gokr_ joined #nimrod
07:48:41*kniteli joined #nimrod
07:53:50*Jesin joined #nimrod
08:06:49*gour_ joined #nimrod
08:07:41*BlaXpirit quit (Quit: Quit Konversation)
08:08:35*Jessin joined #nimrod
08:14:44*Jesin quit (*.net *.split)
08:14:44*gour quit (*.net *.split)
08:19:16*yglukhov___ joined #nimrod
08:22:46*Boscop quit (Quit: Boscop)
08:36:02*milosn quit (Ping timeout: 258 seconds)
08:42:04dts|pokeballtest
08:42:38*Trustable joined #nimrod
08:53:06*dts|pokeball left #nimrod (#nimrod)
08:57:08*dts|pokeball joined #nimrod
09:02:52*dts_ joined #nimrod
09:03:04*dts|pokeball quit (Quit: Leaving)
09:03:05*dts_ quit (Remote host closed the connection)
09:03:24*dts|pokeball joined #nimrod
09:04:44*dts_ joined #nimrod
09:04:53*dts_ quit (Remote host closed the connection)
09:04:53*dts|pokeball quit (Remote host closed the connection)
09:05:18*dts|pokeball joined #nimrod
09:31:08*Epsilon_Contador joined #nimrod
09:34:35*Epsilon_Contador quit (Client Quit)
09:41:00*cir0x joined #nimrod
09:44:13*kniteli quit (Ping timeout: 255 seconds)
09:44:51*milosn joined #nimrod
09:47:20*cir0x quit (Ping timeout: 258 seconds)
09:48:55*cir0x joined #nimrod
10:12:17*voldern joined #nimrod
10:25:14*Trustable quit (Ping timeout: 245 seconds)
10:41:52voldernI'm playing around with the httpserver in nim(rod) and trying to get it to actually close the socket when the program gets a SIGINT
10:41:53voldernhttps://gist.github.com/voldern/a5ea15c375427059a535
10:42:28voldernBut the listening socket stays in TIME_WAIT
10:42:59voldernDoes anyone have any suggestions on how to solve the problem?
10:43:47*Trustable joined #nimrod
10:46:06Araqvoldern: there is also some setter for the CTRL+C event
10:46:42AraqaddQuitProc is a simple wrapper over Ansi C's atexit function
10:46:42voldernThe Before close actually gets echoed
10:47:01Araqoh hrm
10:47:01voldernsockets.nim(474) acceptAddr
10:47:04voldernSIGINT: Interrupted by Ctrl-C.
10:47:05voldernBefore close
10:47:08voldernError: execution of an external program failed
10:47:10voldernaha, the last line might be a hint
10:47:34voldernIts not actually executing the httpserver.close proc. I'll look for the SIGINT handler then, thank you :)
10:48:43Araqwell if it says 'Before close' it should execute the 'close' as well
10:52:45voldernah, TIME_WAIT is unavoidable on linux
10:52:49voldernI need to reuse the addr
10:52:58volderndoh :p
10:53:13Araqsocket programming is a pita
10:56:34voldernmhm, thanks for your quick response anyway
10:57:18*Trustable quit (Quit: Leaving)
10:58:18*Trustable joined #nimrod
10:59:57*gokr_ quit (Ping timeout: 240 seconds)
11:01:10*gokr_ joined #nimrod
11:02:44*cir0x quit (Ping timeout: 264 seconds)
11:08:00*gour_ is now known as gour
11:08:00*gokr_ quit (Remote host closed the connection)
11:08:14*gokr_ joined #nimrod
11:13:54*irrequietus joined #nimrod
11:39:06*flaviu joined #nimrod
11:40:25*gokr_ quit (Ping timeout: 258 seconds)
11:41:12*gokr_ joined #nimrod
11:44:41*Varriount_ joined #nimrod
11:47:37*Varriount quit (Ping timeout: 240 seconds)
12:19:52voldernAraq: I'm trying to implement av very simple server-sent events server. That means that I need to keep a sequence of all the open TSockets and every 1 second send a message to all the clients without blocking the main loop. How would you implement something like this?
12:20:14voldernIf I try to create a reference to the TSocket and add it to a global sequence it get a notice that the code is not GC-safe
12:28:55flaviuvoldern: You can get around the error by casting your thread's main proc to gcsafe
12:29:40flaviuie, let gcsafeProc = cast[proc (...): ... {.gcsafe.}](baseProc), and then call gcsafeProc
12:29:59voldernaha, thx
12:30:27volderni'm trying to implement the server for benchmark test here: https://github.com/voldern/sse-broadcast-benchmark
12:30:46voldernif you have time to look at it, how would you solve something like that in the most performant way in nim?
12:33:41voldernhttps://gist.github.com/voldern/c4550920ed1ed369522f is what i have so far
12:34:45volderni should probably have a thread that loops trough the clients and sends a message every second
12:35:10voldernso i need to start a thread and send a refrence to the sequence of TSockets
12:35:18flaviuI'm not really sure about most efficient.
12:35:53flaviuBut I don't think a shared-memory seq will work without some restrictions
12:38:18*repax joined #nimrod
12:41:18*BitPuffin joined #nimrod
12:41:58voldernhmm, and the async http server returns a sync socket for the client. I think I'll try to hack that into async socket
12:42:27voldernor maybe there is a reason for the way its today?
12:46:18*asterite joined #nimrod
12:48:52flaviuNo idea, perhaps dom96 is around.
12:51:42*ARCADIVS quit (Quit: ARCADIVS)
12:58:39Araqvoldern: yeah dom96 will know. To get a shared seq, you have to use manual memory for now, but it's not hard. That said, sockets contain GC'ed data but rawsockets do not. So ... this will be fun to see how it will work out.
13:04:42*BitPuffin quit (Read error: Connection reset by peer)
13:05:55*BitPuffin joined #nimrod
13:06:42voldernAraq: aha
13:07:19Araqdid I understand you correctly that you're after some broadcast ping?
13:07:32*dyu quit (Ping timeout: 264 seconds)
13:08:00voldernyeah. I want to have a list of open sockets and every second broadcast something to every socket
13:08:06voldernwithout blocking the main thread
13:09:11voldernthis is how I solved it in clojure, if you are familiar with that language: https://github.com/voldern/sse-broadcast-benchmark/blob/master/clojure-http-kit/src/sse_server/core.clj
13:09:24voldernhttps://github.com/voldern/sse-broadcast-benchmark/blob/master/go/server.go <-- Here is a Go version
13:09:38*dyu joined #nimrod
13:10:34*khmm quit (Ping timeout: 244 seconds)
13:12:32*asterite left #nimrod (#nimrod)
13:13:59*dyu quit (Ping timeout: 245 seconds)
13:24:41*gokr_ quit (Ping timeout: 258 seconds)
13:31:33*gokr_ joined #nimrod
13:44:17*yglukhov___ quit (Ping timeout: 264 seconds)
13:49:08*BlaXpirit joined #nimrod
14:01:32*gokr_ quit (Ping timeout: 264 seconds)
14:18:45*irrequietus quit ()
14:23:17*untitaker quit (Ping timeout: 264 seconds)
14:28:01*ZzZMorpork is now known as AMorpork
14:29:09*untitaker joined #nimrod
14:37:52*gour_ joined #nimrod
14:38:57*gour quit (Disconnected by services)
14:39:01*gour_ is now known as gour
14:40:19*khmm joined #nimrod
14:43:04*milosn quit (Ping timeout: 256 seconds)
14:44:53*khmm quit (Ping timeout: 264 seconds)
14:49:16*khmm joined #nimrod
14:53:31flaviuI get a Bad file descriptor [OSError] when using execCmdEx.
14:53:45flaviuI don't think it's my fault, it works most the time.
14:54:11AraqI don't think it's the stdlib's fault since it works most of the time.
14:54:44Araqmaybe your OS runs out of its file descriptors?
14:56:52Araqbut maybe 'close(p)' should be put into a standalone finally/defer
14:56:59Araqtry it please
14:58:40flaviu1 sec, I was very close to the file descriptor cap, so I bumped it up
14:59:09flaviubut that doesn't seem to be the problem, my cap is ~4000, but Bad file descriptor happends around 512
14:59:30Araqdunno, maybe it wraps around
14:59:39Araqand then the index is rather meaningless
15:01:17flaviuI'm going by interation number, not fd number
15:01:32Araqah
15:02:05flaviuIt looks like I'm closing all my file descriptors
15:02:24flaviuactually, it was my fault
15:02:58flaviunm, placing the close in a finally only pushed it to 764
15:05:01Araqbtw I'm replacing the quote with a killer example
15:05:05voldernIs there a way to declare a proc signature as a type ?
15:06:41Araqtype Foo = proc (a, b: int): bool {.nimcall.}
15:07:27voldernand then i implement it using var foobar: Foo = ?
15:07:40Araqyes
15:07:58Araqvar fooBar: Foo = someCompatibleProc
15:08:03voldernaha
15:12:34*yglukhov___ joined #nimrod
15:12:39voldernthank you :)
15:13:13*saml joined #nimrod
15:13:26*darkf quit (Quit: Leaving)
15:13:40dom96_voldern: It doesn't? http://nimrod-lang.org/asynchttpserver.html
15:13:54dom96_If you're using httpserver you're doing it wrong :P
15:14:08voldernah, doh
15:14:08*BlaXpirit quit (Ping timeout: 264 seconds)
15:14:17volderndidn't notice that one :p
15:14:31Araqdom96_: deprecate your stuff finally please
15:14:41Araqand update the docs
15:15:12Araqhrm .... this slideshow is really hard to work with
15:28:19*dyu joined #nimrod
15:29:09dts|pokeballdoes nim have any example code for working with mongodb?
15:29:48volderndts|pokeball: there is a babel package
15:30:02voldernerr, nimble
15:30:20dts|pokeballyeah, i installed that, but i dont know the bindings
15:30:33voldernhttps://github.com/nim-lang/mongo/blob/master/tests/tmongo.nim
15:30:40voldernonly thing i could find
15:30:51voldernthe package is lacking a readme: https://github.com/nim-lang/mongo
15:31:04dts|pokeballty
15:31:17*khmm quit (Ping timeout: 240 seconds)
15:32:13*yglukhov___ quit (Quit: Be back later ...)
15:37:32EXetoCdid you see what I said about its limitations?
15:39:22dts|pokeballno
15:39:30dts|pokeballwhat are they EastByte
15:39:36dts|pokeball** EXetoC
15:40:21EXetoCthat you probably can't do very much with the high level module
15:40:28dts|pokeballhmmm..
15:40:36dts|pokeballhow would i install sqlite then?
15:40:45dts|pokeballfor nim that is
15:40:55AraqEXetoC: hu? why not? what's wrong?
15:41:06Araqthe unit tests look rather impressive
15:41:27EXetoCdts|pokeball: via nimble probably
15:41:32EXetoCAraq: it's unfinished
15:41:38dts|pokeballno nimble doesnt have sqlite
15:41:56EXetoCoh
15:42:00EXetoCit's in the standard distribution
15:42:03Araqdts|pokeball: sqlite is part of the standard distribution
15:42:05EXetoCso just import it
15:42:12dts|pokeballimport sqlite?
15:42:18dts|pokeballi tried that last night
15:42:20EXetoCsee the library list
15:42:27dts|pokeballok
15:42:28Araqimport db_sqlite
15:42:32dts|pokeballah
15:42:51dts|pokeballis there any example sqlite code?
15:45:22EXetoCone example is in the module
15:45:31EXetoCsee the bottom of lib/impure/db_sqlite.nim
15:47:46dts|pokeballty
15:48:40Araqdts|pokeball: nimforum uses sqlite extensively too
15:48:56dts|pokeballyeah, i remember you saying that yesterday
15:49:02AraqEXetoC: what does "unfinished" mean?
15:49:19Araqinsert, search, update, how hard can it be? :P
15:50:16*repax quit (Ping timeout: 250 seconds)
15:55:30EXetoCI'm not very productive for various reasons
15:56:23flaviuEXetoC: Process for being productive: 1) Close IRC. 2) Delete facebook. 3) Drink lots of coffee.
16:02:26dts|pokeballhttp://zetcode.com/db/sqlite/ would this be good for learning sqlite?
16:03:24flaviudts|pokeball: Sqlite is just sql, nothing really special. Learn it the same way you would learn any other language: by using it.
16:04:00Araqdts|pokeball: your link looks fine
16:04:18Araqdon't listen to flaviu. sqlite's SQL is different from other SQLs
16:04:25*milosn joined #nimrod
16:04:44Araqthere is an SQL standard, but every single database has specific extensions or limitations
16:05:53flaviuhuh? The only major difference is that sqlite is dynamically typed.
16:06:24flaviuSqlite also tries very hard to make every other database's syntax valid.
16:08:50Araqthat may well be, but nobody can port e.g. a complex stored procedure from SQLServer to Sqlite
16:09:20Araqwell not without significant effort ... hrm does it even support stored procedures?
16:09:50flaviuYes
16:10:44Araqhttp://nim-lang.org/#why-should-i-be-excited
16:10:49Araqfeedback welcome
16:11:16flaviuactually, I looks like sqlite doesn't have stored procedures. I could have sworn I'd seen them on the sqlitestudio UI
16:12:53flaviuLooks good, although the explanation text is too long IMO
16:14:38gourAraq: simplify the language
16:15:51gourAraq: “Perfection is achieved perfection not when there is nothing left to add, but when there is nothing left to take away.”
16:16:54Araqgour: tell me how.
16:17:08Araqit's not like this stuff is trivial
16:17:30volderndom96_: https://gist.github.com/voldern/677e4bf7a778201a6698 <-- Do you have any suggestion why I get this message: Error: invalid pragma: async ?
16:22:17dom96_voldern: You can't use {.async.} in proc types currently.
16:22:52dom96_You should return a Future[void] instead
16:23:02dom96_anything that returns a future is an async proc
16:23:40dom96_Also, do not discard futures. AsyncCheck them.
16:23:58Araqok, I simplified the explanation, refresh
16:24:21gourAraq: is the 2nd sentence really required or one can say that A => B ?
16:24:51AraqI don't think anybody can understand it without the 2nd sentence
16:25:03gourit's much better now, imho
16:27:13Araqdoes anybody understand why i+=1 is invalid, but i+=2 is not?
16:29:56flaviuI thought that's clear without an explanation.
16:30:18Araqflaviu: great.
16:30:41AraqI thought it's perhaps too subtle
16:31:10*AMorpork is now known as AFKMorpork
16:31:16*gour is not sure
16:32:09*cir0x joined #nimrod
16:34:33*brson joined #nimrod
16:35:38*brson quit (Remote host closed the connection)
16:36:30*brson joined #nimrod
16:36:38*rpag joined #nimrod
16:41:59dom96_voldern: Casting a non-gc-safe proc to a gc-safe one sounds like a bad idea too
16:43:25dom96_Araq: http://blog.rust-lang.org/2014/12/12/1.0-Timeline.html
16:43:41dom96_We can have release candidates instead
16:43:55dom96_But it looks like we're going to match Rust :P
16:47:12Araqnah, we will be quicker
16:47:52dts|pokeballwhen using the sqlite module, i dont need to start Begin Transaction and end with Commit do i?
16:48:32Araqdepends on your query
16:49:04Araqfor 99% of all cases it's not required
16:49:18dts|pokeballuhhhh atm im just creating the initial table and values
16:50:22flaviudts|pokeball: The only time you need it is if you want to improve performance.
16:50:37flaviuor atomically apply a series of operations
16:50:51dts|pokeballhmmmm... ok
16:51:10*rpag quit (Quit: Leaving)
16:51:57*cir0x quit (Ping timeout: 264 seconds)
16:55:52*gokr_ joined #nimrod
16:58:18*starless joined #nimrod
17:08:37ldleworkwe still haven't switched rooms?!
17:11:17Araqwe also haven't released
17:11:28Araqand Varriount_ didn't give me test results
17:15:32*AFKMorpork is now known as AMorpork
17:17:06dts|pokeballso uhh... noob question, how do i create a connection with sqlite?
17:17:22dts|pokeballi found the open function, but im not sure what to do with it
17:17:48ldleworkdts|pokeball: ... call it?
17:17:57EXetoCdid the example not help?
17:18:06dts|pokeballEXetoC, there was no example
17:18:14EXetoCthere is
17:18:19dts|pokeballldlework, but i dont have anything to pass the args
17:18:21EXetoCwhen isMainModule: ...
17:18:27EXetoCyou need to check the actual module file
17:18:29ldleworkdts|pokeball: the name of the database file?
17:19:04dts|pokeballoh thats not near the bottom EXetoC
17:19:26dts|pokeballldlework, i dont have a database file. i was going to do it all in nim
17:20:25EXetoCit is at the bottom of the file, but maybe it should be included in the documentation
17:20:32ldleworkEXetoC: yeah...
17:20:34ldleworklol
17:20:57ldleworkor we need to link the source from the docs
17:21:38*brson quit (Read error: Connection reset by peer)
17:21:48dts|pokeballhttps://github.com/Araq/Nimrod/blob/devel/lib/impure/db_sqlite.nim
17:21:49*brson joined #nimrod
17:21:51dts|pokeballthis file right?
17:22:02EXetoCyes
17:22:15ldleworkAraq: I recommend a template example next
17:23:31*q66 joined #nimrod
17:23:32Araqyeah, DSL example and FFI examples are in the works
17:23:40ldleworkoh great
17:24:30Araqsee you later
17:24:55*BlaXpirit joined #nimrod
17:25:25ldleworko/
17:27:14flaviuldlework: Can you try building nimlets?
17:27:21ldleworkSure thing
17:28:13ldleworkflaviu: hmm do you just run ./build ?
17:28:30flaviuldlework: I just realized that I hadn't updated ./build
17:28:54flaviuhold off a few seconds,
17:28:54*BlaXpirit quit (Client Quit)
17:29:09*ldlework presses and does not release the button labeled "off"
17:29:28*ldlework eventually releases the button
17:31:32flaviuldlework: Ok, pull the latest version and run ./build.
17:33:53ldleworkgcc: error: lib/discount/libmarkdown.a: No such file or directory
17:33:55ldleworkgcc: error: lib/libyaml/libyaml.a: No such file or directory
17:34:07ldleworkI have libmarkdown2-dev and libyaml-dev installed
17:34:22ldleworkWe should use Dockerfiles
17:34:41*willwillson joined #nimrod
17:35:01flaviuYou shouldn't have to have anything installed, it's supposed to pull the sources and build the static libraries.
17:35:45flaviuLet me try to reproduce the issue.
17:36:59flaviuldlework: Can you run ls on lib/discount/?
17:37:33ldleworkhttps://gist.github.com/e228253eecc8c13cde47
17:38:24flaviuDo you have python3-pip and python3-virtualenv?
17:38:36*dyu quit (Quit: Leaving)
17:40:05ldleworkpython3?!
17:40:21flaviuMaybe I don't really need it, let me test
17:41:27flaviuNope, python3 seems to be needed for peru, although I could eventually replace that with shell scripts
17:43:49ldleworkflaviu: where is this markdown lib coming from
17:43:54ldleworkis that a nim or python requirement?
17:44:10flaviuThe markdown lib is in C.
17:44:16ldleworkits like
17:44:23ldleworkits not compiling markdown.nim or yaml.nim
17:44:55flaviuThe problem is that I use a python tool to download and build the libs, and it can't create the virtualenv because it requires python3
17:45:03ldleworkI have python3
17:45:35flaviuCan you gist the output of ./build near the start?
17:45:38*AMorpork is now known as GymMorpork
17:46:22flaviuYou might want to run git clean -fxd to clean everything up first
17:47:29ldleworkflaviu: https://gist.github.com/dustinlacewell/7bc2837c4e876ee877ba
17:48:09ldleworkafter clean: https://gist.github.com/dustinlacewell/cafd88c4b877f5a7dc48
17:50:15flaviuHuh, looks like I used a bashism in a shell script and my system didn't warn me
17:51:02ldleworkshould be using Nim anyway :)
17:51:23flaviuldlework: meh, the shell libraries are bigger ;)
17:51:31flaviuldlework: Pull and try again
17:54:37ldleworkflaviu: https://gist.github.com/dustinlacewell/76bb7bac10e680755efa
17:54:55dts|pokeballdoes db_sqlite's exec function throw an exception if the query didnt work?
17:55:14ldleworkdts|pokeball: look at the source
17:56:18*cir0x joined #nimrod
17:56:55flaviuldlework: oops, I missed one. Ok, fixed and pushed.
17:57:22ldleworkamateur
17:57:28ldlework^_^
17:57:51ldleworkflaviu: its doing stuff now
17:58:02ldleworkoperation successful
17:58:39flaviuI'm testing with lighttpd, config file at https://gist.github.com/bc02260c27931be6b37b, but it doesn't really matter what server is used
17:59:26ldleworkflaviu: ah we should use Docker
18:00:14ldleworkI'll check if there is a lighthttpd image
18:02:32*gokr_ quit (Ping timeout: 256 seconds)
18:02:44*kniteli joined #nimrod
18:02:44flaviuI don't have any problem with docker, but it should be optional. It's a pretty big dependency and might not be available everywhere.
18:03:02*xcombelle joined #nimrod
18:03:24*starless quit (Quit: WeeChat 0.4.2)
18:03:49ldleworkyeah I'd rather not install and configure lighttpd
18:04:15ldleworkI mean doesn't python have a basic webserver?
18:04:36flaviuSo does nim, but it's easiest for me to use whatever's easiest
18:04:44*shodan45 joined #nimrod
18:04:52ldleworkyeah that worked
18:05:00ldleworkflaviu: cd output; python -m SimpleHTTPServer
18:05:09ldleworkdoesn't get easier than that :P
18:05:50flaviuThat's great, I'll use that then
18:06:04flaviuAlthough python2 -m SimpleHTTPServer is more portable
18:08:08ldleworkflaviu: so it seems to work :)
18:10:03ldleworkflaviu: so I see that you have a word-frequency index
18:10:20ldleworkflaviu: should we also index directly by tag, and also by name?
18:10:23ldleworkfor the front page?
18:11:18flaviuYes, but perhaps we should take this into #nimrod-offtopic?
18:11:51ldleworksure
18:14:11*Virannha joined #nimrod
18:18:15*Virannha left #nimrod (#nimrod)
18:25:46*BitPuffin quit (Ping timeout: 256 seconds)
18:35:38*GymMorpork is now known as AMorpork
18:36:03*rpag joined #nimrod
18:39:31dts|pokeball:D Im learning what nim errors mean! yay!
18:42:31willwillsonI'm liking the new code snippet on the website frontpage.
18:48:52ldleworkonionhammer: hey
18:51:34dts|pokeball:\ i spoke too soon. my code isnt working
18:56:12*vendethiel quit (Quit: q+)
18:59:50*untitaker quit (Ping timeout: 244 seconds)
19:02:26*untitaker joined #nimrod
19:18:08*vendethiel joined #nimrod
19:19:57onionhammer ldlework whats up
19:21:03ldleworkonionhammer: your templates lib needs a render method which takes a file from disk
19:21:21onionhammerit would only work at compile-time w/ slurp
19:21:23ldleworkand a context array or something
19:21:40onionhammerand it does work if the extension is '.nim' :)
19:21:49ldleworkwhat?
19:22:13onionhammerit's compile-time only
19:22:56dts|pokeballwould someone mind telling me why http://paste.ubuntu.com/9492892/ doesnt work for ,msg and ,credit? because ,join ,quit and ,part work
19:24:13ldleworkonionhammer: is your think on nimble?
19:24:23onionhammernim-templates?
19:24:26onionhammeryes it's on nimble
19:24:50ldleworkonionhammer: its just called 'templates' right?
19:25:06onionhammercorrect
19:25:32ldleworkoh
19:25:34onionhammerbtw feel free to extend it if you want; PRs welcome
19:25:40ldleworkits probably because our module is called templates.nim
19:25:42ldlework:(
19:25:52onionhammeroh heh..
19:26:12ldleworkI love that Nim pretends namespacing doesn't exist
19:28:40ldleworkonionhammer: hmm, I renamed our module and it still says
19:28:47ldleworkrendering/base.nim(3, 22) Error: undeclared identifier: 'parse_template'
19:30:36onionhammerhm
19:31:21ldleworkBut I'm able to use the macros from your library
19:31:23ldleworkjust not parse_template
19:31:33onionhammerparse_template isn't exposed
19:31:41onionhammer(with a *) so it's non-public
19:31:44ldleworkoh
19:32:18ldleworkonionhammer: means I can't write my 'render' macro that takes a filename
19:32:24ldleworkinstead of embedding the string in the source
19:32:48onionhammeryou can experiment by going into your nimble/pkgs folder
19:33:01onionhammerand modifying templates.nim
19:33:15onionhammerif you can get it to work I would accept a PR, as long as it doesnt break anything :)
19:33:37ldleworkonionhammer: what's the difference between tmpl and tmpli ?
19:33:41onionhammerhave you seen the examples?
19:33:53onionhammertmpli == tmpl + initialization
19:34:02onionhammerit means it initializes the "result" variable
19:34:10onionhammertmpl means it uses an existing "result" variable
19:34:21onionhammerhttp://www.eoleary.me/Blog/The-Templates-Library
19:34:56onionhammerhttps://github.com/onionhammer/nim-templates/blob/master/README.md
19:37:40*cir0x quit (Ping timeout: 260 seconds)
19:38:09ldleworkah you can't use "open" during compile time?
19:38:29onionhammeryou can "slurp" a file
19:38:58onionhammeraka staticRead
19:39:41onionhammerI would recommend using the tmpl macros though
19:40:17onionhammerespecially if you're using nimlime
19:40:23onionhammerwith sublime text
19:40:28onionhammerthen you get syntax highlighting of your templates
19:40:52ldleworkonionhammer: I'm calling your macro from my macro
19:41:19onionhammerwhat i mean is having the templates actually in nim files
19:41:24onionhammerrather than external resource files
19:41:38ldleworkwhy?
19:41:41ldleworkit seems horrible
19:41:44onionhammerwhy not?
19:42:09ldleworkBecause what if you had people who don't know nim, working on your html
19:42:17ldleworkIE designers
19:42:30ldleworkthey shouldn't need a nim ide just to do their job
19:42:32onionhammeryou can have a file that is 99% HTML
19:42:40onionhammerwith a .nim extension ;P
19:42:43onionhammerbut fair enough
19:42:59ldleworkanyway it doesn't seem to work
19:43:03ldleworkI get a nil reference or something
19:43:07onionhammercan you paste your code?
19:43:14onionhammeror pastebin it
19:44:01ldleworkhttps://gist.github.com/dustinlacewell/805a3e69eb32f41bb64d
19:44:23ldleworkI get, https://gist.github.com/dustinlacewell/67665cc450a08d20f3ef
19:46:30onionhammerwhats the content of rendering/html/base.html
19:46:58ldleworkonionhammer: https://gist.github.com/dustinlacewell/d58a9e262229ed9318e1
19:47:57onionhammertry adding result.add parseExpr("result = \"\"")
19:48:17onionhammeri dont think you're initializing the "result" variable anywhere
19:48:29onionhammeror in renderBase just do result = ""
19:49:14flaviuldlework: Neat trick: echo(repr(myNimrodNode)) renders it as code.
19:49:55ldleworkthat worked
19:50:09onionhammercool
19:52:03ldleworkI guess this refactoring is useless
19:52:35ldleworkthe whole from file thing
19:52:39ldleworkbut I do like onionhammer's lib
19:54:15*starless joined #nimrod
19:55:05onionhammerldlework you run into a wall?
20:03:51*rpag is now known as lol
20:04:21*lol is now known as Guest95964
20:26:25*xcombelle quit (Ping timeout: 272 seconds)
20:27:32*cir0x joined #nimrod
20:36:37*cir0x quit (Ping timeout: 245 seconds)
20:37:18ldleworkonionhammer: a wall called 'lunch'
20:42:54*superfunc joined #nimrod
20:51:16*xcombelle joined #nimrod
20:53:13*superfunc quit (Quit: Page closed)
21:02:38*gokr quit (Quit: Leaving.)
21:07:15*vendethiel- joined #nimrod
21:08:54*vendethiel quit (Ping timeout: 258 seconds)
21:19:15*gokr joined #nimrod
21:21:00*cir0x joined #nimrod
21:24:12*Matthias247 joined #nimrod
21:30:37*milosn quit (Ping timeout: 240 seconds)
21:38:46*ldlework yawns
21:40:22dts|pokeballare you tired ldlework ?
21:40:26ldleworkbored
21:40:37dts|pokeball:D i have a solution!
21:41:18dts|pokeballyou could help me debug my code
21:43:19*milosn joined #nimrod
21:45:23ldleworkthat sounds boring too
21:46:45dts|pokeball:/
21:47:57ldleworkdts|pokeball: what are you writing
21:48:15dts|pokeballldlework, an irc bot that makes use of sqlite
21:50:12*xcombelle quit (Ping timeout: 260 seconds)
22:01:39ldleworkdts|pokeball: what does it do though
22:04:01dts|pokeballuhhh join #learnprogramming and ill show you a working example
22:11:00volderndom96_: thank you so much for the help :)
22:21:27*kapil__ quit (Quit: Connection closed for inactivity)
22:27:38*starless quit (Quit: WeeChat 0.4.2)
22:29:20*gour quit (Quit: Konversation terminated!)
22:44:13Araqflaviu: did you move your "nimrod by example" website?
22:44:41flaviuAraq: Yes, http://nim-by-example.github.io/
22:45:06Araqvery well, I need to update the site then
22:45:10Araqagain.
22:45:53*Matthias247 quit (Read error: Connection reset by peer)
22:46:29dts|pokeballoh while youre updating the site, you misspelled a word on the sockets page
22:46:47Araqwhat word
22:46:52dts|pokeballiff
22:46:56Araqlol
22:47:09onionhammeriff = "if an only if" ;)
22:47:38dts|pokeballoh
22:47:40dts|pokeballnever mind
22:50:54*Trustable quit (Quit: Leaving)
22:51:58*Trustable joined #nimrod
22:54:24*cir0x quit (Ping timeout: 245 seconds)
22:59:09AraqTrustable: can you please fix that font color issue?
22:59:38Trustableok, I can try
22:59:52Araqcss is in web/assets
23:00:14Trustablebut I really wonder why some web devs not define the font color in general (e.g. for body)
23:00:16Araqor just pastebin your diff
23:00:41Trustableit's just a body(color:black)
23:00:54TrustableI mean body{color: black}
23:01:13Trustablebecause not everyone has default font color black
23:01:16Araq*shrug* the browser should generally invert the colors when you switch to white on black
23:01:40Trustableno, that would be ugly
23:02:09Araqbut better than white on white
23:02:28Araqin general the browser should adapt the contrast automatically, it's not hard
23:03:09Araqand when I do body {color: black} shouldn't I also set the background color?
23:05:25flaviuAraq: I'm not sure what you're asking
23:05:57flaviubody {color : black;} will make all the text in elements of type body black
23:06:31Araqwhat if the default background color is black?
23:06:52Araqdo I then get black on black? in what situation is that a useful behaviour?
23:07:10Araqwhy does nobody ever think something through?
23:07:53flaviuAraq: People see implicit behavior as undesirable. I agree with them, it's not a good idea to change text color based on background color.
23:08:32Araqflaviu: the alternative is a web where 99% of all pages break on a black background. good luck with that.
23:09:14flaviuAh, I see. Try adding normalize.css to the website
23:10:00Araqwhat's that? the hack around the broken spec?
23:11:32flaviuThe spec is not broken. It works as intended.
23:11:54Araqthe spec is completely misguided in lots of places
23:13:03Araqand the whole approach is barbaric and hasn't been designed with proper tooling in mind
23:13:45flaviuPerhaps, but this is one place where it isn't. Recall the sort of webpages that all this was initially intended for: http://motherfuckingwebsite.com/. See how that page doesn't customize the background or foreground color?
23:14:07flaviuIt would work perfectly with the "misguided" behavior.
23:14:40flaviuThen people come along and decide they don't like that, and make webpages more complicated. It then breaks.
23:16:51Araqno you're wrong but I don't feel like discussing these things
23:17:39flaviuno, you're wrong, but I don't feel like talking about it either.
23:18:13TrustableAraq: My opinion about CSS font and background color: Define both or leave both up to the browser. Do not define only font color or only background color.
23:19:05AraqTrustable: exactly. but the browser should be sensible when you do make this mistake.
23:19:38Araqthat's what the browser intends to do anyway, it tries to be helpful. it doesn't say "won't render you forgot a </b> tag"
23:20:00Araqnow whether that itself is a good idea is another debate
23:21:27*saml quit (Quit: Leaving)
23:21:32*Jessin quit (Quit: Leaving)
23:24:55*Guest95964 is now known as jesuschrist
23:25:25*jesuschrist is now known as Guest4013
23:31:23*Guest4013 is now known as gandhi
23:31:56TrustableAraq: PR is done https://github.com/Araq/Nimrod/pull/1731
23:33:17TrustableAraq: thx
23:36:09*jux joined #nimrod
23:42:30AraqTrustable: updated. please try it.
23:43:05Trustable Araq: works
23:43:53Araqtested it on LyX too?
23:44:18Araqon your smartphone?
23:44:50Araqthe browser that runs on Haiku?
23:45:19TrustableAraq: Do you see the color of the link "Nimble package manager" on the home page? Maybe the color is too bright.
23:45:54TrustableBut that is a decision of the designer, no technical issue.
23:46:12Araqyeah, filwit said he want to send minor CSS patches
23:47:27Araqdoes it render correctly on Plan 9? on Firefox running on Motif on AIX?
23:49:39flaviuAraq: Works great on lynx
23:50:04Araqflaviu: thank god.
23:50:43ldleworklol
23:50:54flaviuw3m works well too.
23:53:58Araqlet's see if you'll also run FF on Motif on AIX
23:54:35flaviuFirefox is cross platform, it should work fine.
23:55:03Araqyeah you can never be sure without testing
23:55:10TrustableAraq: Big thanks for the procCall feature. Now Nim is complete for me :)
23:55:43ldleworkwhat does procCall do
23:55:54Araqit calls your mother.
23:55:55Trustablehttp://goran.krampe.se/2014/11/30/nim-and-oo-part-iv/
23:56:06TrustableIt allow the "super call"
23:57:16flaviuAraq: It's horribly broken on opera: http://browsershots.org/screenshots/3fc77cd5f953b801affc75506191c939
23:57:39Araqah now we're talking
23:58:31Araqalways remember: the axiom of choice must not be questioned.
23:59:07dts|pokeballwhat does this mean? Normal “receiver only” dynamic dispatch.
23:59:09flaviuThat looks like old opera though, new opera works fine: browsershots.org/screenshots/23e1483ddf60c8368cf2e3566105b393